Interview - Dockerfile

mail@pastecode.io avatarunknown
plain_text
2 months ago
352 B
0
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"]