-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
65 lines (54 loc) · 1.69 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
56
57
58
59
60
61
62
63
64
65
FROM mumez/ubuntu-vnc-supervisor
LABEL maintainer="Masashi Umezawa <ume@softumeya.com>"
## Install prerequisites and utilities
RUN apt-get update && apt-get install -y \
libssl1.1 \
libaudio2 \
unzip \
&& rm -rf /var/lib/apt/lists/*
# --------------------
# Pharo
# --------------------
ENV DISPLAY=:0
ARG PHARO_IMAGE_VERSION=110
ENV PHARO_MODE='gui'
ENV PHARO_IMAGE='Pharo.image'
ARG PHARO_DEFAULT_IMAGE_DIR='/root/data'
ENV PHARO_HOME=${PHARO_DEFAULT_IMAGE_DIR}
ENV PHARO_START_SCRIPT=${PHARO_DEFAULT_IMAGE_DIR}/config/default-startup.st
RUN mkdir pharo && cd pharo \
&& apt-get update && apt-get install -y --no-install-recommends \
curl \
unzip \
&& curl https://get.pharo.org/64/${PHARO_IMAGE_VERSION}+vm | bash \
&& mv ../pharo /usr/local/bin/ \
&& apt-get remove -y \
unzip \
&& rm -rf /var/lib/apt/lists/*
ENV PATH="/usr/local/bin/pharo:${PATH}"
# --------------------
# Setup scripts
# --------------------
ADD ./launch-pharo.sh /usr/local/bin/
ADD ./save-pharo.sh /usr/local/bin/
ADD ./setup.sh /usr/local/bin/
ADD ./docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/*
# --------------------
# Workspace
# --------------------
WORKDIR ${PHARO_DEFAULT_IMAGE_DIR}
RUN cp /usr/local/bin/pharo/Pharo*.* ${PHARO_DEFAULT_IMAGE_DIR}
ADD ./config/default-startup.st ${PHARO_DEFAULT_IMAGE_DIR}/config/
VOLUME ${PHARO_DEFAULT_IMAGE_DIR}
EXPOSE 9000
# --------------------
# Supervisor
# --------------------
ENV PHARO_SUPERVISOR_LOG_NAME=pharo-supervisord.log
COPY pharo-supervisord.conf /etc/supervisor/conf.d/pharo-supervisord.conf
# --------------------
# ENTRYPOINT
# --------------------
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["supervisord"]