-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |