-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (31 loc) · 977 Bytes
/
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
# Dockerfile
FROM mambaorg/micromamba:1.5.9
USER root
# Run apt install
RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install gcc g++ \
cmake \
git \
ninja-build \
libopenblas-dev \
build-essential \
pkg-config -y
# Don't write .pyc files into image to reduce image size
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
# Install conda environment to /opt/env/ and prepend to PATH
COPY environment.yml /opt/
RUN micromamba create -f /opt/environment.yml -p /opt/env/
ENV PATH="/opt/env/bin:$PATH"
# Change work directory
WORKDIR /app
# run the container as a non-root user
ENV USER=aaltorse
RUN groupadd -r $USER && useradd -r -g $USER $USER
USER $USER
# Copy application contents (this includes the frontend files, and only those)
COPY --chown=aaltorse:aaltorse ./app .
# Frontend needs to be compiled!
COPY --chown=aaltorse:aaltorse ./frontend/dist ./dist
COPY ./entrypoint.sh .
# Entrypoint
ENTRYPOINT ["./entrypoint.sh"]