Update Dockerfile
Browse files- Dockerfile +10 -6
Dockerfile
CHANGED
|
@@ -1,5 +1,11 @@
|
|
| 1 |
FROM continuumio/anaconda3:main
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
WORKDIR /code
|
| 4 |
COPY ./environment.yml /code/environment.yml
|
| 5 |
|
|
@@ -11,8 +17,6 @@ RUN useradd -m -u 1000 user
|
|
| 11 |
|
| 12 |
# Switch to the "user" user
|
| 13 |
USER user
|
| 14 |
-
|
| 15 |
-
# Set home to the user's home directory
|
| 16 |
ENV HOME=/home/user \
|
| 17 |
PYTHONPATH=$HOME/app \
|
| 18 |
PYTHONUNBUFFERED=1 \
|
|
@@ -25,8 +29,8 @@ ENV HOME=/home/user \
|
|
| 25 |
# Set the working directory to the user's home directory
|
| 26 |
WORKDIR $HOME/app
|
| 27 |
|
| 28 |
-
# Copy the current directory contents into the container at $HOME/app
|
| 29 |
COPY --chown=user . $HOME/app
|
| 30 |
-
|
| 31 |
-
# CMD
|
| 32 |
-
CMD ["conda", "run", "--no-capture-output", "-n", "dolfinx-env", "bash", "run.sh"]
|
|
|
|
| 1 |
FROM continuumio/anaconda3:main
|
| 2 |
|
| 3 |
+
# Install system dependencies for X11/GUI
|
| 4 |
+
USER root
|
| 5 |
+
RUN apt-get update && \
|
| 6 |
+
apt-get install -y libxft2 libxrender1 libxext6 libfreetype6 libfontconfig1 && \
|
| 7 |
+
apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 8 |
+
|
| 9 |
WORKDIR /code
|
| 10 |
COPY ./environment.yml /code/environment.yml
|
| 11 |
|
|
|
|
| 17 |
|
| 18 |
# Switch to the "user" user
|
| 19 |
USER user
|
|
|
|
|
|
|
| 20 |
ENV HOME=/home/user \
|
| 21 |
PYTHONPATH=$HOME/app \
|
| 22 |
PYTHONUNBUFFERED=1 \
|
|
|
|
| 29 |
# Set the working directory to the user's home directory
|
| 30 |
WORKDIR $HOME/app
|
| 31 |
|
| 32 |
+
# Copy the current directory contents into the container at $HOME/app
|
| 33 |
COPY --chown=user . $HOME/app
|
| 34 |
+
|
| 35 |
+
# CMD to run your app
|
| 36 |
+
CMD ["conda", "run", "--no-capture-output", "-n", "dolfinx-env", "bash", "run.sh"]
|