mirror of https://github.com/JohnHammond/CTFd.git
Pin Ubuntu version and follow Dockerfile best practices (#218)
Docker provides some useful resources for Ubuntu as a base image and installing software via apt-get: https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#apt-get It's also useful to pin the Ubuntu version to 16.04 so we have a good idea of what OS we're using in the image. To that end, I think we can also avoid performing an upgrade so we can even further control which versions of software we're using. If we do an upgrade then you'll have different versions of software depending on when you build the image.selenium-screenshot-testing
parent
4b077dfa37
commit
e237715b33
16
Dockerfile
16
Dockerfile
|
@ -1,7 +1,13 @@
|
|||
FROM ubuntu:latest
|
||||
RUN apt-get update -y
|
||||
RUN apt-get upgrade -y
|
||||
RUN apt-get install build-essential python-dev python-pip libffi-dev mysql-client -y
|
||||
FROM ubuntu:16.04
|
||||
|
||||
RUN apt update && \
|
||||
apt install -y \
|
||||
build-essential \
|
||||
libffi-dev \
|
||||
mysql-client \
|
||||
python-dev \
|
||||
python-pip && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
VOLUME ["/opt/CTFd"]
|
||||
|
||||
|
@ -17,4 +23,4 @@ RUN chmod +x /opt/CTFd/docker-entrypoint.sh
|
|||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/opt/CTFd/docker-entrypoint.sh"]
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "-w", "4", "CTFd:create_app()", "--access-logfile", "/opt/CTFd/CTFd/logs/access.log", "--error-logfile", "/opt/CTFd/CTFd/logs/error.log"]
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "-w", "4", "CTFd:create_app()", "--access-logfile", "/opt/CTFd/CTFd/logs/access.log", "--error-logfile", "/opt/CTFd/CTFd/logs/error.log"]
|
||||
|
|
Loading…
Reference in New Issue