Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed baseimage to allow for multiarch build (specifically arm64) #38

Merged
merged 3 commits into from
Feb 22, 2023
Merged
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
16 changes: 10 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
FROM jlesage/baseimage:alpine-3.15-glibc as builder
FROM alpine:3.17.1 as builder

ENV APP_HOME="/i2p"

WORKDIR /tmp/build
COPY . .

RUN add-pkg --virtual build-base gettext tar bzip2 apache-ant openjdk17 \
RUN apk add --virtual build-base gettext tar bzip2 apache-ant openjdk17 \
&& echo "build.built-by=Docker" >> override.properties \

&& ant preppkg-linux-only \
&& rm -rf pkg-temp/osid pkg-temp/lib/wrapper pkg-temp/lib/wrapper.* \
&& del-pkg build-base gettext tar bzip2 apache-ant openjdk17
&& apk del build-base gettext tar bzip2 apache-ant openjdk17

FROM jlesage/baseimage:alpine-3.15-glibc
FROM alpine:3.17.1
ENV APP_HOME="/i2p"

RUN add-pkg openjdk17-jre ttf-dejavu
RUN apk add openjdk17-jre ttf-dejavu

WORKDIR ${APP_HOME}
COPY --from=builder /tmp/build/pkg-temp .

# "install" i2p by copying over installed files
COPY docker/rootfs/ /
COPY --chown=root:root docker/rootfs/ /
RUN chmod +x /startapp.sh

# Mount home and snark
VOLUME ["${APP_HOME}/.i2p"]
Expand All @@ -35,3 +38,4 @@ LABEL \
org.label-schema.vcs-url="https://github.com/i2p/i2p.i2p" \
org.label-schema.schema-version="1.0"

ENTRYPOINT ["/startapp.sh"]