Files
podman/contrib/helloimage/Containerfile
tomsweeneyredhat 40ba9f10e5 Make the hello image leaner
[NO TESTS NEEDED]

Change from using a bash script to a c file
for running the image.  With thanks to discussions
with @afbjorklund, the Containerfile was rigged
up to make the final image be only KB's in size.

Also add USER 1000 to make the image test/run as
non-root, and update the README.md

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2022-02-10 15:45:04 -05:00

12 lines
385 B
Docker

FROM docker.io/alpine as builder
RUN apk add gcc libc-dev
ADD podman_hello_world.c .
RUN gcc -O2 -static -o podman_hello_world podman_hello_world.c
FROM scratch
LABEL maintainer="Podman Maintainers"
LABEL artist="Máirín Ní Ḋuḃṫaiġ, Twitter:@mairin"
USER 1000
COPY --from=builder podman_hello_world /usr/local/bin/podman_hello_world
CMD ["/usr/local/bin/podman_hello_world"]