forked from sinanugur/MirMachine
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
43 lines (28 loc) · 1.09 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
# syntax=docker/dockerfile:1
FROM continuumio/miniconda3:latest AS backend
RUN apt update && \
apt install -y curl
#RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash
#RUN apt install -y nodejs && \
# apt install -y npm
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
ENV NODE_VERSION=16.13.0
ENV NVM_DIR=/root/.nvm
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
WORKDIR /app
COPY environment.yml ./
RUN conda env create -f environment.yml -n mirmachine
COPY . ./
WORKDIR /app/lookupService/frontend
RUN npm install
RUN npm run build
WORKDIR /app
SHELL ["conda", "run", "-n", "mirmachine", "bin/bash", "-c"]
RUN ["conda", "run", "--no-capture-output", "-n", "mirmachine", \
"python", "manage.py", "migrate"]
EXPOSE 8000
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "mirmachine", \
"python", "manage.py", "runserver", "0.0.0.0:8000"]