mirror of
https://github.com/svpcom/wfb-ng.git
synced 2025-02-11 03:33:55 -04:00
Use Makefile to build virtualenv inside of docker
This commit is contained in:
parent
a79a9ced47
commit
6595bbb557
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,6 +3,7 @@
|
||||
*.pyc
|
||||
dist/
|
||||
deb_dist/
|
||||
docker/src/
|
||||
build/
|
||||
env/
|
||||
_trial_temp/
|
||||
|
1
Makefile
1
Makefile
@ -79,6 +79,7 @@ clean:
|
||||
deb_docker: /opt/qemu/bin
|
||||
@if ! [ -d /opt/qemu ]; then echo "Docker cross build requires patched QEMU!\nApply ./scripts/qemu/qemu.patch to qemu-7.2.0 and build it:\n ./configure --prefix=/opt/qemu --static --disable-system && make && sudo make install"; exit 1; fi
|
||||
if ! ls /proc/sys/fs/binfmt_misc | grep -q qemu ; then sudo ./scripts/qemu/qemu-binfmt-conf.sh --qemu-path /opt/qemu/bin --persistent yes; fi
|
||||
cp -a Makefile docker/src/
|
||||
TAG="wfb-ng:build-`date +%s`"; docker build -t $$TAG docker --build-arg SRC_IMAGE=$(DOCKER_SRC_IMAGE) && \
|
||||
docker run -i --rm -v $(PWD):/build $$TAG bash -c "trap 'chown -R --reference=. .' EXIT; export VERSION=$(VERSION) COMMIT=$(COMMIT) SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) && cd /build && make clean && make test && make deb"
|
||||
docker ps -a -f 'status=exited' --format '{{ .ID }} {{ .Image }}' | grep wfb-ng:build | tail -n+11 | while read c i ; do docker rm $$c && docker rmi $$i; done
|
||||
|
@ -11,8 +11,8 @@ RUN apt-get update && \
|
||||
python3-future python3-all python3-all-dev \
|
||||
python3-serial dh-python python3-setuptools python3-msgpack
|
||||
|
||||
|
||||
COPY src/Makefile /tmp
|
||||
ENV ENV=/opt/env
|
||||
ENV PYTHON=python3
|
||||
|
||||
RUN virtualenv --python=$PYTHON $ENV
|
||||
RUN $ENV/bin/pip install --upgrade pip setuptools git+https://github.com/svpcom/stdeb
|
||||
RUN cd /tmp && make $ENV
|
||||
|
0
docker/src/.gitignore
vendored
Normal file
0
docker/src/.gitignore
vendored
Normal file
Loading…
Reference in New Issue
Block a user