-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
22 lines (22 loc) · 923 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM --platform=linux/amd64 ubuntu:18.04 as server
ENV MARXAN_SERVER_DIRECTORY=/marxan-server/
# Install miniconda and dependencies
COPY ./unix_install.sh ./marxan-server/
RUN ./marxan-server/unix_install.sh
ENV CONDA_DEFAULT_ENV=base
ENV GDAL_DATA=/miniconda3/share/gdal
ENV PROJ_LIB=/miniconda3/share/proj
# Copy files
COPY . /marxan-server/.
# Create vanilla server files
COPY ./server.dat.default ./marxan-server/server.dat
COPY ./users/admin/user.dat.default ./marxan-server/users/admin/user.dat
COPY ./marxan-server.log.default ./marxan-server/marxan-server.log
COPY ./runlog.dat.default ./marxan-server/runlog.dat
# move favicon to the tornado static file folder
COPY ./favicon.ico ./marxan-client/build/favicon.ico
# Activate conda base environment
RUN echo "conda activate base" >> ~/.bashrc
SHELL ["/bin/bash", "--login", "-c"]
# Entry point
ENTRYPOINT [ "/miniconda3/bin/python", "/marxan-server/server.py"]