1+ FROM debian:stretch-slim
2+
3+ # Update the sources.list to use archived repositories
4+ RUN echo "deb http://archive.debian.org/debian stretch main\n \
5+ deb http://archive.debian.org/debian-security stretch/updates main" > /etc/apt/sources.list
6+
7+ # Disable the check for valid signatures on the archived repositories
8+ # as the archived keys may not be up to date
9+ RUN apt-get -o Acquire::Check-Valid-Until=false update
10+
11+ # Install Python 2.7, pip, OpenJDK 8, libxml2-dev, libxslt-dev, and zlib1g-dev
12+ RUN apt-get install -y --allow-unauthenticated \
13+ python2.7 \
14+ python-pip \
15+ openjdk-8-jdk \
16+ libxml2-dev \
17+ libxslt-dev \
18+ zlib1g-dev \
19+ && apt-get clean \
20+ # Check if the python symlink exists and if it does, check if it points to python2.7
21+ # If it doesn't exist or it points to a different version of python, create the symlink
22+ && ( [ ! -e /usr/bin/python ] || [ "$(readlink -f /usr/bin/python)" != "$(which python2.7)" ] ) && ln -sf $(which python2.7) /usr/bin/python || true
23+
24+ # Set the working directory in the container
25+ WORKDIR /usr/src/app
26+
27+ # Copy the current directory contents into the container at /usr/src/app
28+ COPY . .
29+
30+ # Install Jinja2 and lxml using pip
31+ RUN pip install --trusted-host pypi.python.org Jinja2 lxml
32+
33+ # Make port 80 available to the world outside this container
34+ EXPOSE 80
35+
36+ # Define environment variable
37+ ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
38+
39+ # The default command keeps the container running without serving the site
40+ CMD ["tail" , "-f" , "/dev/null" ]
41+
42+ # # Run generator.py when the container launches
43+ # CMD ["python", "generator.py", "build", "--all", "--images"]
44+
45+ # Assuming the static site is generated in the 'generated' directory
46+ # CMD ["sh", "-c", "cd generated && python -m SimpleHTTPServer 80"]
0 commit comments