Skip to content

Commit

Permalink
WIP try building arm64 image on arm64
Browse files Browse the repository at this point in the history
Currently still fails without rosetta compatibility mode, see ticket.

Fixes #313
  • Loading branch information
afranken committed Nov 23, 2021
1 parent 53dda84 commit fdf9466
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions docker/src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,11 @@
# limitations under the License.
#

FROM adoptopenjdk/openjdk11:${adoptopenjdk11.image.version} as staging_area

# create a minimal jdk assembly with those modules that we need
RUN jlink \
--module-path $JAVA_HOME/jmods \
--verbose \
--add-modules java.base,java.logging,java.xml,jdk.unsupported,java.sql,java.naming,java.desktop,java.management,java.security.jgss,java.instrument \
--compress 2 \
--no-header-files \
--no-man-pages \
--strip-debug \
--output /target/opt/jdk-minimal

# add libz* files, so that we don't have to re-install that (not included in alpine-glibc)
RUN mkdir -p /target/usr/glibc-compat/lib; \
cp /usr/glibc-compat/lib/libz* /target/usr/glibc-compat/lib

#
# build the actual image
#
FROM frolvlad/alpine-glibc:${alpine-glibc.image.version}

# copy files prepared in the other container
COPY --from=staging_area /target /

# rebuild ld.so.cache to add libz
RUN /usr/glibc-compat/sbin/ldconfig
FROM arm64v8/openjdk:17

ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8 \
JAVA_HOME=/opt/jdk-minimal \
PATH="$PATH:/opt/jdk-minimal/bin" \
root=/s3mockroot

EXPOSE 9090 9191
Expand Down

0 comments on commit fdf9466

Please sign in to comment.