1- # This file is a docker (https://www.docker.com/what-docker) recipe, which can
2- # be used to build a docker image which is ready to run a datatracker in
3- # development mode.
1+ # This file is a Docker (https://www.docker.com/why-docker) recipe, which can
2+ # be used to run a datatracker in development mode.
43#
5- # It is used to build an image (once you've installed docker) using a command
6- # like this (assuming suitable replacement of $variables):
7- #
8- # $ docker build -t ietf/datatracker:latest .
4+ # The "build" script in this directory can be used to build a Docker image for
5+ # the current branch locally.
96#
107# To use a pre-built image, assuming we have a checked-out datatracker
11- # repository at /home/me/src/ 6.8.1.dev0, you would start (again assuming you've
12- # installed docker) a container from an image, as follows:
8+ # repository at /datatracker/ 6.8.1.dev0, you would start a container from an
9+ # image, as follows:
1310#
14- # $ docker run -ti -v /home/me/src/ 6.8.1.dev0:/root ietf/datatracker:latest
11+ # $ docker run -ti -v /datatracker/ 6.8.1.dev0:/root/src ietf/datatracker:latest
1512
1613FROM ubuntu:latest
1714LABEL maintainer="IETF Tools Team <tools-discuss@ietf.org>"
1815
1916# Default django runserver port
2017EXPOSE 8000
2118
22- # Fetch apt package information, and upgrade to latest package versions
19+ # Install all dependencies that are available as packages
2320ENV DEBIAN_FRONTEND=noninteractive
24- RUN apt-get update && apt-get -qy dist-upgrade
25-
26- # Install the packages we need
27- RUN apt-get install -qy \
21+ RUN apt-get -y update && \
22+ apt-get -y dist-upgrade && \
23+ apt-get -y install -y \
2824 apache2-utils \
29- chromium-chromedriver \
25+ curl \
3026 enscript \
3127 ghostscript \
28+ git \
3229 graphviz \
3330 libmariadbclient-dev \
3431 mariadb-server \
32+ npm \
3533 python-is-python3 \
3634 python3-pip \
37- yang-tools
35+ yang-tools && \
36+ apt-get -y clean
3837
39- # Get rid of installation files we don't need in the image, to reduce size
40- RUN apt-get clean && rm -rf /var/lib/apt/lists/*
38+ # Install bower
39+ RUN npm install -g bower
4140
42- # idnits and dependencies
41+ # Install idnits
4342ADD https://tools.ietf.org/tools/idnits/idnits /usr/local/bin/
4443RUN chmod +rx /usr/local/bin/idnits
4544
46- # Install current datatracker dependencies
47- WORKDIR /root
48- COPY requirements.txt .
49- RUN pip install -r requirements.txt
45+ # Install current datatracker python dependencies
46+ COPY requirements.txt /
47+ RUN pip install -r /requirements.txt
5048
5149COPY docker-init.sh /docker-init.sh
5250RUN chmod +x /docker-init.sh
51+
52+ WORKDIR /root/src
5353ENTRYPOINT ["/docker-init.sh" ]
0 commit comments