forked from biolab/orange-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
66 lines (51 loc) · 2.35 KB
/
Dockerfile
File metadata and controls
66 lines (51 loc) · 2.35 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
ARG MINIFORGE_VERSION=24.11.3-0
FROM condaforge/miniforge3:${MINIFORGE_VERSION}
ARG TIGERVNC_VERSION=1.10.1+dfsg-3ubuntu0.20.04.1
ARG FLUXBOX_VERSION=1.3.5-2build2
ARG UNZIP_VERSION=6.0-25ubuntu1.1
ARG NOVNC_VERSION=1.5.0
ARG ORANGE3_VERSION=3.38.1
ARG PYTHON_VERSION=3.10
ARG IMAGE_TAG=1.0.0
ARG BUILD_DATE_TIME
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
# install TigerVNC server and fluxbox
RUN apt-get update && apt-get install -y \
tigervnc-standalone-server=${TIGERVNC_VERSION} \
fluxbox=${FLUXBOX_VERSION} \
unzip=${UNZIP_VERSION} \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# install noVNC from github since version in package manager is outdated or requires snap
RUN wget https://github.com/novnc/noVNC/archive/refs/tags/v${NOVNC_VERSION}.zip && \
unzip v${NOVNC_VERSION}.zip -d /usr/share && \
mv -T /usr/share/noVNC-${NOVNC_VERSION} /usr/share/novnc && \
rm v${NOVNC_VERSION}.zip && \
apt-get purge -y unzip && apt-get autoremove -y
ENV PATH=/usr/share/novnc/utils:$PATH
# install Orange
RUN conda create python=${PYTHON_VERSION} --yes --name orange3 && \
conda init bash && \
bash -c "source activate base && conda activate orange3" && \
conda install orange3=${ORANGE3_VERSION} "catboost=*=*cpu*" --yes && conda clean -afy
ENV PATH=/opt/conda/envs/orange3/bin:$PATH
ENV DISPLAY=:0
EXPOSE 6080
ENV SHARED=0
# copy the data if it exists
COPY ./dat[a]/ /data/
# copy the init script
COPY --chmod=700 init.sh ./init.sh
# create the password file for VNC server
RUN --mount=type=secret,id=noVNC_password \
mkdir -p ~/.vnc && \
cat /run/secrets/noVNC_password | vncpasswd -f > ~/.vnc/passwd && \
chmod 600 ~/.vnc/passwd
LABEL org.opencontainers.image.title="OrangeDocker - VNC Server Docker Image" \
org.opencontainers.image.description="A Docker image that sets up a VNC server accessible via a web browser, allowing remote desktop access. It supports password protection, volume mounting for data persistence, and options for multiple simultaneous connections." \
org.opencontainers.image.authors="Bioinformatics Laboratory, FRI UL; Benjamin Škiljan; Gašper Žitko" \
org.opencontainers.image.version=${IMAGE_TAG} \
org.opencontainers.image.created=${BUILD_DATE_TIME} \
org.opencontainers.image.source="https://github.com/biolab/orange-docker"
# run the application
ENTRYPOINT ["./init.sh"]