Skip to content

Commit

Permalink
feat(release): add crane to werf images (#6377)
Browse files Browse the repository at this point in the history
Signed-off-by: Fral738 <frolov1998kc@mail.ru>
  • Loading branch information
Fral738 authored Oct 31, 2024
1 parent 89bbf76 commit 9f0249c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
6 changes: 6 additions & 0 deletions scripts/werf-in-image/alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ RUN curl -sSLO https://github.com/mikefarah/yq/releases/latest/download/yq_linux
mv yq_linux_amd64 /usr/local/bin/yq && \
chmod +x /usr/local/bin/yq

RUN ARCH=`uname -m` && \
case "$ARCH" in "aarch64") ARCH=arm64 ;; esac && \
curl -sL "https://github.com/google/go-containerregistry/releases/download/v0.20.2/go-containerregistry_Linux_$ARCH.tar.gz" > go-containerregistry.tar.gz && \
tar -zxvf go-containerregistry.tar.gz -C /usr/local/bin/ crane && \
rm -f go-containerregistry.tar.gz

# Fix messed up setuid/setgid capabilities.
RUN setcap cap_setuid+ep /usr/bin/newuidmap && \
setcap cap_setgid+ep /usr/bin/newgidmap && \
Expand Down
8 changes: 7 additions & 1 deletion scripts/werf-in-image/argocd-cmp-sidecar-ubuntu.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND="noninteractive"

RUN apt-get -y update && apt-get -y install fuse-overlayfs git uidmap libcap2-bin tzdata && \
RUN apt-get -y update && apt-get -y install curl fuse-overlayfs git uidmap libcap2-bin tzdata && \
rm -rf /var/cache/apt/* /var/lib/apt/lists/* /var/log/*

RUN ARCH=`uname -m` && \
if [[ $ARCH -eq "aarch64" ]]; then ARCH=arm64; fi && \
curl -sL "https://github.com/google/go-containerregistry/releases/download/v0.20.2/go-containerregistry_Linux_$ARCH.tar.gz" > go-containerregistry.tar.gz && \
tar -zxvf go-containerregistry.tar.gz -C /usr/local/bin/ crane && \
rm -f go-containerregistry.tar.gz

# Fix messed up setuid/setgid capabilities.
RUN setcap cap_setuid+ep /usr/bin/newuidmap && \
setcap cap_setgid+ep /usr/bin/newgidmap && \
Expand Down
6 changes: 6 additions & 0 deletions scripts/werf-in-image/centos.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ RUN curl -sSLO https://github.com/mikefarah/yq/releases/latest/download/yq_linux
mv yq_linux_amd64 /usr/local/bin/yq && \
chmod +x /usr/local/bin/yq

RUN ARCH=`uname -m` && \
if [[ $ARCH -eq "aarch64" ]]; then ARCH=arm64; fi && \
curl -sL "https://github.com/google/go-containerregistry/releases/download/v0.20.2/go-containerregistry_Linux_$ARCH.tar.gz" > go-containerregistry.tar.gz && \
tar -zxvf go-containerregistry.tar.gz -C /usr/local/bin/ crane && \
rm -f go-containerregistry.tar.gz

# Fix messed up setuid/setgid capabilities.
RUN setcap cap_setuid+ep /usr/bin/newuidmap && \
setcap cap_setgid+ep /usr/bin/newgidmap && \
Expand Down
6 changes: 6 additions & 0 deletions scripts/werf-in-image/fedora.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ RUN curl -sSLO https://github.com/mikefarah/yq/releases/latest/download/yq_linux
mv yq_linux_amd64 /usr/local/bin/yq && \
chmod +x /usr/local/bin/yq

RUN ARCH=`uname -m` && \
if [[ $ARCH -eq "aarch64" ]]; then ARCH=arm64; fi && \
curl -sL "https://github.com/google/go-containerregistry/releases/download/v0.20.2/go-containerregistry_Linux_$ARCH.tar.gz" > go-containerregistry.tar.gz && \
tar -zxvf go-containerregistry.tar.gz -C /usr/local/bin/ crane && \
rm -f go-containerregistry.tar.gz

# Fix messed up setuid/setgid capabilities.
RUN setcap cap_setuid+ep /usr/bin/newuidmap && \
setcap cap_setgid+ep /usr/bin/newgidmap && \
Expand Down
6 changes: 6 additions & 0 deletions scripts/werf-in-image/ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ RUN curl -sSLO https://github.com/mikefarah/yq/releases/latest/download/yq_linux
mv yq_linux_amd64 /usr/local/bin/yq && \
chmod +x /usr/local/bin/yq

RUN ARCH=`uname -m` && \
if [[ $ARCH -eq "aarch64" ]]; then ARCH=arm64; fi && \
curl -sL "https://github.com/google/go-containerregistry/releases/download/v0.20.2/go-containerregistry_Linux_$ARCH.tar.gz" > go-containerregistry.tar.gz && \
tar -zxvf go-containerregistry.tar.gz -C /usr/local/bin/ crane && \
rm -f go-containerregistry.tar.gz

# Fix messed up setuid/setgid capabilities.
RUN setcap cap_setuid+ep /usr/bin/newuidmap && \
setcap cap_setgid+ep /usr/bin/newgidmap && \
Expand Down

0 comments on commit 9f0249c

Please sign in to comment.