diff options
Diffstat (limited to 'contrib/helloimage/Containerfile')
-rw-r--r-- | contrib/helloimage/Containerfile | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/contrib/helloimage/Containerfile b/contrib/helloimage/Containerfile index bea71cae0..0cbf6d9a0 100644 --- a/contrib/helloimage/Containerfile +++ b/contrib/helloimage/Containerfile @@ -1,8 +1,11 @@ -FROM registry.access.redhat.com/ubi8-micro:latest +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" -WORKDIR /tmp - -COPY podman_hello_world.bash . -ENTRYPOINT ./podman_hello_world.bash +USER 1000 +COPY --from=builder podman_hello_world /usr/local/bin/podman_hello_world +CMD ["/usr/local/bin/podman_hello_world"] |