Skip to content

Commit

Permalink
Merge pull request #18 from vpa1977/vpa1977/podman
Browse files Browse the repository at this point in the history
Split args into several lines to be compatible with podman
  • Loading branch information
vpa1977 authored Feb 15, 2023
2 parents 0cd1dd7 + 0ee23ad commit 7579d3d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions chiselled-jre/Dockerfile.22.04
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
ARG UBUNTU_RELEASE=22.04
ARG USER=app UID=101 GROUP=app GID=101
ARG USER=app
ARG UID=101
ARG GROUP=app
ARG GID=101

FROM golang:1.18 AS chisel
ARG UBUNTU_RELEASE
Expand All @@ -21,21 +24,26 @@ COPY --from=chisel /opt/chisel/chisel /usr/bin/
### BOILERPLATE END ###

FROM builder AS sliced-deps
ARG USER UID GROUP GID
ARG USER
ARG UID
ARG GROUP
ARG GID
COPY --from=chisel /opt/chisel-releases /opt/chisel-releases
RUN mkdir -p /rootfs \
&& chisel cut --release /opt/chisel-releases --root /rootfs \
openjdk-8-jre-headless_bins \
media-types_data \
libglib2.0-0_libs \
libjpeg-turbo8_libs
libjpeg-turbo8_libs
RUN install -d -m 0755 -o $UID -g $GID /rootfs/home/$USER \
&& echo -e "root:x:0:\n$GROUP:x:$GID:" >/rootfs/etc/group \
&& echo -e "root:x:0:0:root:/root:/noshell\n$USER:x:$UID:$GID::/home/$USER:/noshell" >/rootfs/etc/passwd
COPY --from=builder /etc/ssl/certs/java/cacerts /rootfs/etc/ssl/certs/java/cacerts

FROM scratch
ARG USER UID GID
ARG USER
ARG UID
ARG GID
USER $UID:$GID
COPY --from=sliced-deps /rootfs /
# Workaround for https://github.com/moby/moby/issues/38710
Expand Down

0 comments on commit 7579d3d

Please sign in to comment.