From 8bc2400d22de0f7286732e1dedd3152f9564aac2 Mon Sep 17 00:00:00 2001 From: Tine Jozelj Date: Fri, 25 Dec 2020 14:25:30 +0100 Subject: [PATCH] feat(packages): make them executable in alpine image --- Dockerfile.ubuntu | 4 ++-- packages/Dockerfile.kubectl | 6 ++++-- packages/Dockerfile.starship | 6 ++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 324c77d..a3998e4 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -51,8 +51,8 @@ RUN set -ueox pipefail \ /var/tmp/* # Install other packages -COPY --from=ghcr.io/mentos1386/starship:0.47.0 /starship /usr/local/bin/starship -COPY --from=ghcr.io/mentos1386/kubectl:1.20.0 /kubectl /usr/local/bin/kubectl +COPY --from=ghcr.io/mentos1386/starship:0.47.0 /usr/local/bin/starship /usr/local/bin/starship +COPY --from=ghcr.io/mentos1386/kubectl:1.20.0 /usr/local/bin/kubectl /usr/local/bin/kubectl # Golang COPY --from=golang:1.15.6 --chown=${SSH_USER} /usr/local/go /home/${SSH_USER}/.go ENV PATH=/home/${SSH_USER}/.go/bin:$PATH diff --git a/packages/Dockerfile.kubectl b/packages/Dockerfile.kubectl index 1785f42..88b4c10 100644 --- a/packages/Dockerfile.kubectl +++ b/packages/Dockerfile.kubectl @@ -10,9 +10,11 @@ ARG TARGETPLATFORM RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/v${VERSION}/bin/${TARGETPLATFORM}/kubectl" RUN chmod +x kubectl -FROM scratch AS binaries +FROM alpine:3 LABEL maintainer="Tine Jozelj " LABEL org.opencontainers.image.source https://github.com/mentos1386/workspace -COPY --from=build /root/kubectl / +COPY --from=build /root/kubectl /usr/local/bin/kubectl + +ENTRYPOINT /usr/local/bin/kubectl diff --git a/packages/Dockerfile.starship b/packages/Dockerfile.starship index 73efa08..97f1ed0 100644 --- a/packages/Dockerfile.starship +++ b/packages/Dockerfile.starship @@ -10,9 +10,11 @@ RUN git clone https://github.com/starship/starship.git \ RUN cargo build --release RUN strip target/release/starship -FROM scratch AS binaries +FROM alpine:3 LABEL maintainer="Tine Jozelj " LABEL org.opencontainers.image.source https://github.com/mentos1386/workspace -COPY --from=build /usr/src/starship/target/release/starship / +COPY --from=build /usr/src/starship/target/release/starship /usr/local/bin/starship + +ENTRYPOINT /usr/local/bin/starship