diff --git a/Dockerfile b/Dockerfile index 768c857..3371f3d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,10 +2,13 @@ FROM debian:stable-slim #ARG ARCH=amd64 ARG NRF_CONNECT_TAG=v2.3.0 +# Should be for selected NRF_CONNECT_TAG +ARG ZEPHYR_NEEDED_TAG=0.15.2 # For new versions - xz ARG ZEPHYR_ARCHIVE_EXTENSION=gz -# Should be for selected NRF_CONNECT_TAG -ENV ZEPHYR_TAG=0.15.2 + +# For entrypoint file +ENV ZEPHYR_TAG=$ZEPHYR_NEEDED_TAG RUN ARCH="$(dpkg --print-architecture)" && \ case $ARCH in \ @@ -69,7 +72,8 @@ RUN ARCH="$(dpkg --print-architecture)" && \ rm zephyr-sdk-${ZEPHYR_TAG}_linux-$ZEPHYR_ARCH.tar.${ZEPHYR_ARCHIVE_EXTENSION} && \ apt-get remove python3-pip build-essential -y && \ apt autoremove -y && \ - apt autoclean -y + apt autoclean -y && \ + find ./zephyr-sdk-${ZEPHYR_TAG} -maxdepth 1 -not -name zephyr-sdk-${ZEPHYR_TAG} -not -name 'arm-zephyr-eabi' -not -name 'cmake' -not -name 'sdk_*' -not -name '*.sh' -exec rm -R {} \; COPY ./entrypoint.sh /bin/ diff --git a/docker-compose.yml b/docker-compose.yml index 4d2a36b..7e79ce0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,5 +7,6 @@ services: context: . dockerfile: Dockerfile args: - - NRF_CONNECT_TAG=v2.4.2 - - ZEPHYR_TAG=0.16.1 + - NRF_CONNECT_TAG=v2.3.0 + - ZEPHYR_NEEDED_TAG=0.15.2 + - ZEPHYR_ARCHIVE_EXTENSION=gz diff --git a/entrypoint.sh b/entrypoint.sh index 689dcdb..4928574 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -9,8 +9,8 @@ #. ~/.bashrc . /root/gn/zephyr/zephyr-env.sh -/bin/bash /root/zephyr-sdk-${ZEPHYR_TAG}/setup.sh -t all -/bin/bash /root/zephyr-sdk-${ZEPHYR_TAG}/setup.sh -h +/bin/bash /root/zephyr-sdk-${ZEPHYR_TAG}/setup.sh -t arm-zephyr-eabi +#/bin/bash /root/zephyr-sdk-${ZEPHYR_TAG}/setup.sh -h /bin/bash /root/zephyr-sdk-${ZEPHYR_TAG}/setup.sh -c $@