-
Notifications
You must be signed in to change notification settings - Fork 4
/
DockerfileJMod
41 lines (27 loc) · 1.16 KB
/
DockerfileJMod
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
FROM michaelwetter/ubuntu-1604_jmodelica_trunk:latest
# Note jmodlica python "env" is located at /usr/local/JModelica/bin/jm_python.sh
MAINTAINER Patrik Meijer <[email protected]>
# docker build -f DockerfileJMod -t webgme-dss-worker .
######################## NVM/NODE/NPM ########################
USER root
RUN apt-get update \
&& apt-get install build-essential libssl-dev curl git-core -y
# The docker worker manager currently requires the cwd to be /usr/app
RUN chown developer:developer /usr
USER developer
ENV NODE_VERSION 10.15.0
ENV NVM_DIR ${HOME}/.nvm
RUN curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
RUN node -v
######################## WebGME API/Docker worker ###################
RUN mkdir /usr/app
# copy app source
COPY --chown=developer . /usr/app/
WORKDIR /usr/app
# Install the node-modules.
RUN npm install
# Uncomment this line if webgme-docker-worker-manager is a node_module
RUN cp /usr/app/node_modules/webgme-docker-worker-manager/dockerworker.js /usr/app/dockerworker.js