Skip to content

Commit

Permalink
Adapt Dockerfile to GoReleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
thardeck committed Jun 20, 2024
1 parent 79707d6 commit 9019e0f
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions package/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
ARG BUILD_ENV=docker
ARG ARCH

FROM registry.suse.com/bci/bci-base:15.5
RUN zypper -n update && \
zypper -n install openssh catatonit git-core && \
zypper -n clean -a
RUN useradd -u 1000 -U -m gitjob
COPY bin/gitjob /usr/bin/
COPY bin/gitcloner /usr/bin

FROM base AS copy_docker
ONBUILD ARG ARCH
ONBUILD COPY bin/gitjob /usr/bin/gitjob
ONBUILD COPY bin/gitcloner /usr/bin/gitcloner

FROM base AS copy_buildx
ONBUILD ARG TARGETARCH
ONBUILD COPY bin/gitjob-linux-$TARGETARCH /usr/bin/gitjob
ONBUILD COPY bin/gitcloner-linux-$TARGETARCH /usr/bin/gitcloner

FROM base AS copy_goreleaser
ONBUILD ARG ARCH
ONBUILD COPY gitjob-linux-${ARCH} /usr/bin/gitjob
ONBUILD COPY gitcloner-linux-${ARCH} /usr/bin/gitcloner

FROM copy_${BUILD_ENV}
USER 1000
ENTRYPOINT ["catatonit", "--"]
CMD ["gitjob"]

0 comments on commit 9019e0f

Please sign in to comment.