hello-ci/Dockerfile

26 lines
586 B
Docker
Raw Permalink Normal View History

2020-02-14 08:50:27 +00:00
# build stage
FROM ubuntu:18.04 AS build
ENV DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin
2020-02-13 09:31:49 +00:00
2020-02-14 08:50:27 +00:00
RUN apt-get update && \
apt-get -y install --no-install-recommends g++ && \
rm -rf /var/lib/apt/lists/*
COPY main.cpp /app/main.cpp
WORKDIR /app
RUN g++ -o main main.cpp
2020-02-14 09:45:23 +00:00
2020-02-14 08:50:27 +00:00
# run stage
FROM ubuntu:18.04 AS run
ENV DEBIAN_FRONTEND=noninteractive TZ=Europe/Berlin
RUN apt-get update && \
apt-get -y install --no-install-recommends file && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /app/main /app/main
2020-02-14 09:45:23 +00:00
2020-02-13 09:31:49 +00:00
COPY run.sh /app/run.sh
RUN chmod +x /app/run.sh
CMD ["/app/run.sh"]