Interview - Dockerfile

mail@pastecode.io avatar
unknown
dockerfile
a year ago
351 B
2
Indexable
Never
FROM ubuntu:20.04
LABEL maintainer="yourname@example.com"
LABEL version="1.0"
ENV APP_HOME=/app
ENV PORT=80
WORKDIR $APP_HOME
COPY . $APP_HOME/
RUN apt-get update && \
    apt-get install -y python3 && \
    apt-get clean
EXPOSE $PORT
HEALTHCHECK --interval=30s --timeout=10s \
  CMD curl -f http://localhost:$PORT/ || exit 1
CMD ["python3", "app.py"]