Skip to content

Commit

Permalink
make platform specific sops
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticroentgen committed Jul 31, 2024
1 parent eb44499 commit cce59fb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM debian:12-slim
ARG TARGETPLATFORM
RUN apt update && apt install python3-pip python3 pipx git curl zsh dialog jq yq fzf exa neovim locales -y
COPY locale.gen /etc/locale.gen
RUN locale-gen
Expand All @@ -17,7 +18,15 @@ RUN curl --proto '=https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opent
chmod +x /tmp/install-opentofu.sh && /tmp/install-opentofu.sh --install-method deb

# Sops
RUN curl -LO https://github.com/getsops/sops/releases/download/v3.9.0/sops-v3.9.0.linux.amd64 && mv sops-v3.9.0.linux.amd64 /usr/bin/sops && chmod +x /usr/bin/sops
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
echo "Performing actions specific to AMD64"; \
curl -LO https://github.com/getsops/sops/releases/download/v3.9.0/sops-v3.9.0.linux.amd64 && mv sops-v3.9.0.linux.amd64 /usr/bin/sops && chmod +x /usr/bin/sops \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
echo "Performing actions specific to ARM64"; \
curl -LO https://github.com/getsops/sops/releases/download/v3.9.0/sops-v3.9.0.linux.arm64 && mv sops-v3.9.0.linux.arm64 /usr/bin/sops && chmod +x /usr/bin/sops \
else \
echo "Unknown platform"; \
fi

# OhMyZsh
RUN /bin/zsh -c 'sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"'
Expand Down

0 comments on commit cce59fb

Please sign in to comment.