Skip to content
Snippets Groups Projects
Commit d5edd847 authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

feat: use chmod on ADD/COPY

parent 82f2974f
No related branches found
No related tags found
1 merge request!644feat: use chmod on ADD/COPY
...@@ -54,8 +54,7 @@ ADD https://get.docker.com/ /tmp/get-docker.sh ...@@ -54,8 +54,7 @@ ADD https://get.docker.com/ /tmp/get-docker.sh
RUN bash /tmp/get-docker.sh --version ${DOCKER_VERSION} RUN bash /tmp/get-docker.sh --version ${DOCKER_VERSION}
# Install the magic wrapper. # Install the magic wrapper.
ADD ./wrapdocker /usr/local/bin/wrapdocker ADD --chmod=0755 wrapdocker /usr/local/bin/wrapdocker
RUN chmod +x /usr/local/bin/wrapdocker
# Define additional metadata for our image. # Define additional metadata for our image.
VOLUME /var/lib/docker VOLUME /var/lib/docker
......
...@@ -193,14 +193,13 @@ COPY profile.d/z11_jug_env.sh /etc/profile.d ...@@ -193,14 +193,13 @@ COPY profile.d/z11_jug_env.sh /etc/profile.d
COPY singularity.d /.singularity.d COPY singularity.d /.singularity.d
## Add minio client into /usr/local/bin ## Add minio client into /usr/local/bin
ADD https://dl.min.io/client/mc/release/linux-amd64/mc /usr/local/bin/mc-amd64 ADD --chmod=0755 https://dl.min.io/client/mc/release/linux-amd64/mc /usr/local/bin/mc-amd64
ADD https://dl.min.io/client/mc/release/linux-arm64/mc /usr/local/bin/mc-arm64 ADD --chmod=0755 https://dl.min.io/client/mc/release/linux-arm64/mc /usr/local/bin/mc-arm64
RUN declare -A target=( \ RUN declare -A target=( \
["linux/amd64"]="amd64" \ ["linux/amd64"]="amd64" \
["linux/arm64"]="arm64" \ ["linux/arm64"]="arm64" \
) \ ) \
&& mv /usr/local/bin/mc-${target[${TARGETPLATFORM}]} /usr/local/bin/mc \ && mv /usr/local/bin/mc-${target[${TARGETPLATFORM}]} /usr/local/bin/mc \
&& chmod a+x /usr/local/bin/mc \
&& unset target[${TARGETPLATFORM}] \ && unset target[${TARGETPLATFORM}] \
&& for t in ${target[*]} ; do \ && for t in ${target[*]} ; do \
rm /usr/local/bin/mc-${t} ; \ rm /usr/local/bin/mc-${t} ; \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment