summaryrefslogtreecommitdiff
path: root/contrib/helloimage/Containerfile
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-02-10 20:45:56 -0500
committerGitHub <noreply@github.com>2022-02-10 20:45:56 -0500
commit466b8991c4025006eeb43cb30e6dc990d92df72d (patch)
tree1aa7eda5aeb0d5aa44f3358d137568d04e892e29 /contrib/helloimage/Containerfile
parent6d2b54a731cf5ac9a7e760709748ee96a636d65e (diff)
parent40ba9f10e5fbdd3c9d36389107b8bf1caec6cef0 (diff)
downloadpodman-466b8991c4025006eeb43cb30e6dc990d92df72d.tar.gz
podman-466b8991c4025006eeb43cb30e6dc990d92df72d.tar.bz2
podman-466b8991c4025006eeb43cb30e6dc990d92df72d.zip
Merge pull request #13202 from TomSweeneyRedHat/dev/tsweeney/newhello
Make the hello image leaner
Diffstat (limited to 'contrib/helloimage/Containerfile')
-rw-r--r--contrib/helloimage/Containerfile13
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"]