-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
44 lines (34 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM python:3.9
RUN useradd \
--create-home \
--shell /bin/bash \
--uid 1001 \
--user-group \
psat
# Set the working directory in the container
WORKDIR /app
# Install system dependencies and then remove cache to reduce image size
RUN apt-get update && apt-get install -y \
build-essential \
pkg-config \
apache2 \
apache2-dev \
libhdf5-dev \
default-mysql-client \
default-libmysqlclient-dev \
swig \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy the parent directory (the repo) contents into the container at /app
COPY . .
# Install python dependencies and the package itself
RUN pip install --no-cache-dir -e .
# pip install --no-cache-dir mod_wsgi-express
WORKDIR /app/psat_server_web/atlas
# Link to the images dir and change ownership of everything in the app directory
# to the psat user
RUN ln -s /images /app/psat_server_web/atlas/media/images/data && \
chown -R psat:psat /app
USER 1001
# Set the command to run on container start
CMD ["bash"]