mirror of
https://github.com/dockersrc/alpine
synced 2026-06-30 17:45:53 -04:00
🗃️ Install packages before running initial setup scripts 🗃️
Dockerfile: reorder build steps so `apk add ${PACK_LIST}` runs before
the initial setup script (00-init.sh). The setup script depends on
packages from PACK_LIST, so installing first avoids relying on
implicit package state.
Dockerfile
This commit is contained in:
+4
-4
@@ -61,15 +61,15 @@ WORKDIR /root
|
|||||||
|
|
||||||
COPY ./dockerfs/. /
|
COPY ./dockerfs/. /
|
||||||
|
|
||||||
|
RUN set -e; \
|
||||||
|
echo 'Installing packages' && \
|
||||||
|
apk update && apk add --no-cache ${PACK_LIST}
|
||||||
|
|
||||||
RUN set -e; \
|
RUN set -e; \
|
||||||
echo 'Running initial scripts' && \
|
echo 'Running initial scripts' && \
|
||||||
sh -c "INIT_DATE='${BUILD_DATE}' && export INIT_DATE && bash -c /root/docker/setup/00-init.sh" && \
|
sh -c "INIT_DATE='${BUILD_DATE}' && export INIT_DATE && bash -c /root/docker/setup/00-init.sh" && \
|
||||||
echo 'Initial setup completed'
|
echo 'Initial setup completed'
|
||||||
|
|
||||||
RUN set -e; \
|
|
||||||
echo 'Installing packages' && \
|
|
||||||
apk update && apk add --no-cache ${PACK_LIST}
|
|
||||||
|
|
||||||
RUN set -e; \
|
RUN set -e; \
|
||||||
echo 'Running post install scripts' && \
|
echo 'Running post install scripts' && \
|
||||||
bash -c "/root/docker/setup/01-packages.sh" && \
|
bash -c "/root/docker/setup/01-packages.sh" && \
|
||||||
|
|||||||
Reference in New Issue
Block a user