-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
55 lines (43 loc) · 1.85 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
45
46
47
48
49
50
51
52
53
54
55
ARG IMAGE=intersystemsdc/irishealth-community:latest
FROM $IMAGE
# For non community version
# COPY key/iris.key /usr/irissys/mgr/iris.key
USER root
# Update package and install sudo
RUN apt-get update && apt-get install -y \
nano \
python3-pip \
python3-venv \
sudo && \
/bin/echo -e ${ISC_PACKAGE_MGRUSER}\\tALL=\(ALL\)\\tNOPASSWD: ALL >> /etc/sudoers && \
sudo -u ${ISC_PACKAGE_MGRUSER} sudo echo enabled passwordless sudo-ing for ${ISC_PACKAGE_MGRUSER}
# create dev directory
WORKDIR /opt/irisapp
RUN chown ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/irisapp
USER ${ISC_PACKAGE_MGRUSER}
# Copy source files to image
COPY . /opt/irisapp
# load demo stuff
RUN iris start IRIS \
&& iris session IRIS < /opt/irisapp/iris.script && iris stop IRIS quietly
# create Python env
ENV PYTHON_PATH=/usr/irissys/bin/irispython
ENV SRC_PATH=/opt/irisapp
ENV IRISUSERNAME "SuperUser"
ENV IRISPASSWORD "SYS"
ENV IRISNAMESPACE "USER"
#ENV PATH "/usr/irissys/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/irisowner/bin"
# Requirement for embedded python
RUN pip3 install -r ${SRC_PATH}/src/Python/requirements.txt
# Install Native API
# For now Native API wheel is not embedded in container
COPY misc/intersystems_irispython-3.2.0-py3-none-any.whl /usr/irissys/dev/python/intersystems_irispython-3.2.0-py3-none-any.whl
RUN pip3 install /usr/irissys/dev/python/intersystems_irispython-3.2.0-py3-none-any.whl
# Install Jupyter
RUN pip3 install jupyter
RUN mkdir /home/irisowner/.local/share/jupyter/kernels/irispython
COPY misc/kernels/irispython/* /home/irisowner/.local/share/jupyter/kernels/irispython/
# Install objectscript kernel
RUN mkdir /home/irisowner/.local/share/jupyter/kernels/objectscript
COPY misc/kernels/objectscript/* /home/irisowner/.local/share/jupyter/kernels/objectscript/
ENTRYPOINT [ "/tini", "--", "/opt/irisapp/entrypoint.sh" ]