scripts and fixes

This commit is contained in:
Christoph Honal 2020-02-12 17:57:13 +01:00
parent 1ed6d81e7f
commit 110f6adf09
5 changed files with 29 additions and 20 deletions

View File

@ -39,7 +39,7 @@ ENV DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin
# Setup build deps
RUN apt-get update && \
apt-get -y install --no-install-recommends build-essential git cmake autoconf automake unzip libtool-bin pkgconf libssl-dev \
python2.7 python-pip libcppunit-dev swig uuid-dev libusb-1.0-0-dev \
python2.7 python-pip python3 python3-pip python-cheetah libcppunit-dev swig uuid-dev libusb-1.0-0-dev \
python-mako libzmq3-dev libcomedi-dev python-sip-dev python-six socat && \
rm -rf /var/lib/apt/lists/*
@ -49,7 +49,7 @@ FROM base-cli as base-gui
# Setup grc and gui deps
RUN apt-get update && \
apt-get -y install --no-install-recommends python-numpy python-wxgtk3.0 python-cheetah libzmq3-dev \
apt-get -y install --no-install-recommends python-numpy python-wxgtk3.0 libzmq3-dev \
libqt4-opengl-dev python-qt4 libqwt-dev python-gtk2 python-lxml && \
rm -rf /var/lib/apt/lists/*
@ -73,15 +73,17 @@ RUN mkdir build && cd build && \
FROM base-${UI_MODE} AS run
# Copy sources from build stage
COPY --from=build /app/move2radio/build/prefix/usr /usr
COPY --from=build /app/move2radio/build/prefix/usr /app/move2radio/build/prefix/usr
COPY --from=build /app/move2radio/AppDir/move-ii-gr /app/move2radio/AppDir/move-ii-gr
ENV PATH="/app/move2radio/build/prefix/usr/bin:${PATH}" \
PYTHONPATH="/app/move2radio/build/prefix/usr/lib/python2.7/dist-packages:${PYTHONPATH}" \
LD_LIBRARY_PATH="/app/move2radio/build/prefix/usr/lib:${LD_LIBRARY_PATH}"
# Install binaries
COPY build/blocks/* /usr/share/gnuradio/grc/blocks/
RUN chmod 644 /usr/share/gnuradio/grc/blocks/*.xml && \
ldconfig
COPY build/blocks/* app/move2radio/build/prefix/usr/share/gnuradio/grc/blocks/
COPY build/fakeserver/* /app/fakeserver/
COPY build/run.sh /app/run.sh
RUN chmod 644 app/move2radio/build/prefix/usr/share/gnuradio/grc/blocks/*.xml && \
chmod +x /app/run.sh && ldconfig
# Entrypoint
RUN chmod +x /app/run.sh
ENTRYPOINT ["/app/run.sh"]

View File

@ -4,7 +4,7 @@ cd "${0%/*}/.."
source ./config/config.sh
export PROP_SERVER_KEY=$(cat ./config/id_rsa)
export UI_MODE=cli
export UI_MODE=$1
docker build --build-arg UI_MODE \
--build-arg PROP_SERVER --build-arg PROP_SERVER_USER --build-arg PROP_SERVER_KEY \
--build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER -t registry.chrz.de:443/move2docker:$UI_MODE-latest-$(arch) .
--build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER -t registry.chrz.de:443/move2docker:$UI_MODE-$(arch) .

10
scripts/buildx.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
cd "${0%/*}/.."
source ./config/config.sh
export PROP_SERVER_KEY=$(cat ./config/id_rsa)
export UI_MODE=$1
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg UI_MODE \
--build-arg PROP_SERVER --build-arg PROP_SERVER_USER --build-arg PROP_SERVER_KEY \
--build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER -t move2docker:$UI_MODE-latest .

View File

@ -1,11 +1,4 @@
#!/bin/bash
docker tag registry.chrz.de:443/move2docker:cli-latest-$(arch) registry.chrz.de:443/move2docker:latest-$(arch)
docker push registry.chrz.de:443/move2docker:cli-latest-$(arch)
docker push registry.chrz.de:443/move2docker:gui-latest-$(arch)
docker push registry.chrz.de:443/move2docker:latest-$(arch)
# docker manifest create registry.chrz.de:443/move2docker:latest registry.chrz.de:443/move2docker:latest-x86_64 registry.chrz.de:443/move2docker:latest-armv7l
# docker manifest annotate registry.chrz.de:443/move2docker:latest registry.chrz.de:443/move2docker:latest-x86_64 --os linux --arch amd64
# docker manifest annotate registry.chrz.de:443/move2docker:latest registry.chrz.de:443/move2docker:latest-armv7l --os linux --arch armv7
# docker manifest push registry.chrz.de:443/move2docker:latest --purge
docker push registry.chrz.de:443/move2docker:cli-$(arch)
docker push registry.chrz.de:443/move2docker:gui-$(arch)

View File

@ -1,3 +1,7 @@
#!/bin/bash
docker run -it --rm -v ./data:/app/data:rw --env DISPLAY=host.docker.internal:0.0 registry.chrz.de:443/move2docker:latest
cd "${0%/*}/.."
source ./config/config.sh
export UI_MODE=$1
docker run -it --rm -v ./data:/app/data:rw --env DISPLAY=host.docker.internal:0.0 registry.chrz.de:443/move2docker:$UI_MODE-latest-$(arch)