Dockerfile 967 B

1234567891011121314151617181920212223242526272829
  1. FROM debian:latest
  2. MAINTAINER Volodymyr Tkach <vladimirok5959@gmail.com>
  3. ENV ENV_HOST=127.0.0.1 ENV_PORT=8080 ENV_DATA_DIR=/app/data
  4. COPY ./bin/ip2location /app/app
  5. ARG DEBIAN_FRONTEND=noninteractive
  6. RUN apt-get -y update && \
  7. apt-get -y upgrade && \
  8. apt-get install -y curl ca-certificates && \
  9. dpkg-reconfigure -p critical ca-certificates && \
  10. echo "" >> /root/.profile && \
  11. echo "TIME_ZONE=\$(cat /etc/timezone)" >> /root/.profile && \
  12. echo "export TZ=\"\${TIME_ZONE}\"" >> /root/.profile && \
  13. echo "" >> /root/.bashrc && \
  14. echo "TIME_ZONE=\$(cat /etc/timezone)" >> /root/.bashrc && \
  15. echo "export TZ=\"\${TIME_ZONE}\"" >> /root/.bashrc && \
  16. mkdir /app/data && \
  17. mkdir /app/logs && \
  18. chmod +x /app/app
  19. HEALTHCHECK --interval=30s --timeout=5s --start-period=5s CMD curl --fail http://localhost:$ENV_PORT/api/v1/app/health || exit 1
  20. EXPOSE 8080
  21. VOLUME /app/data
  22. CMD export TZ="$(cat /etc/timezone)" && /app/app