-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (33 loc) · 1.16 KB
/
Dockerfile
File metadata and controls
47 lines (33 loc) · 1.16 KB
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
# Based on https://github.com/polynote/polynote/blob/master/docker/base/Dockerfile
FROM openjdk:8-slim-buster
LABEL Polynote Dockerfile with Meapy
ARG POLYNOTE_VERSION="0.5.1"
ARG SCALA_VERSION="2.11"
ARG DIST_TAR="polynote-dist.tar.gz"
WORKDIR /opt
RUN apt update -y && \
apt install -y wget python3 python3-dev python3-pip build-essential
RUN wget -q https://github.com/polynote/polynote/releases/download/$POLYNOTE_VERSION/$DIST_TAR && \
tar xfzp $DIST_TAR && \
echo "DIST_TAR=$DIST_TAR" && \
rm $DIST_TAR
RUN python3 -m pip install --upgrade pip
RUN pip3 install -r ./polynote/requirements.txt
RUN pip3 install numpy pandas meapy==0.0.11 matplotlib
# to wrap up, we create (safe)user
ENV UID 1000
ENV NB_USER polly
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${UID} \
${NB_USER}
# allow user access to the WORKDIR
RUN chown -R ${NB_USER}:${NB_USER} /opt/
# start image as (safe)user
USER ${NB_USER}
# expose the (internal) port that polynote runs on
EXPOSE 8192
# use the same scala version for server
ENV POLYNOTE_SCALA_VERSION ${SCALA_VERSION}
# start polynote on container run
ENTRYPOINT ["./polynote/polynote.py"]