Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.26.1</version>
<version>0.40.2</version>
<executions>
<execution>
<id>docker-build</id>
Expand All @@ -94,8 +94,15 @@
<autoPull>always</autoPull>
<images>
<image>
<name>${dockerCafImagePrefix}opensuse-base${dockerProjectVersion}</name>
<name>armie.lan/opensuse-base</name>
<build>
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
<configFile>~/buildx.cfg</configFile>
</buildx>
<dockerFileDir>.</dockerFileDir>
<args>
<!-- Enable internet access -->
Expand Down
11 changes: 8 additions & 3 deletions src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,27 @@ RUN zypper -n refresh && \
# Stage 2: Download and verify gosu
#
FROM stage1 AS stage2
ARG TARGETARCH

# Install dirmngr to enable gosu verification
RUN zypper -n install dirmngr

# Download and verify gosu
RUN gpg --batch --keyserver-options http-proxy=${env.HTTP_PROXY} --keyserver hkps://keys.openpgp.org \
--recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && \
curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.14/gosu-amd64" && \
curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.14/gosu-amd64.asc" && \
curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.14/gosu-${TARGETARCH}" && \
curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.14/gosu-${TARGETARCH}.asc" && \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \
chmod +x /usr/local/bin/gosu

#
# Stage 3: The remainder of the actual image definition
#
FROM stage1
ARG TARGETPLATFORM
Copy link
Copy Markdown
Author

@andyreidz andyreidz Aug 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove this echo

ARG BUILDPLATFORM
ARG TARGETARCH
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM $TARGETARCH" > /log

# Copy gosu
COPY --from=stage2 /usr/local/bin/gosu /usr/local/bin/gosu
Expand All @@ -73,7 +78,7 @@ RUN chmod +x /startup/* /startup/startup.d/*

# Add Tini
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TARGETARCH} /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--", "/startup/startup.sh"]

Expand Down