docker-hello/Dockerfile

20 lines
309 B
Docker
Raw Normal View History

2017-08-31 07:53:47 +00:00
FROM debian
COPY hello.c /src/
RUN \
export DEBIAN_FRONTEND=noninteractive \
&& apt update \
&& apt install -y gcc \
&& ( \
cd /src \
&& gcc -Wall -o /usr/local/bin/hello hello.c \
) \
&& apt autoremove -y --purge gcc \
&& rm -rf \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*
CMD ["hello"]