-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile.new
219 lines (175 loc) · 9.15 KB
/
Dockerfile.new
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
FROM dorowu/ubuntu-desktop-lxde-vnc:latest
LABEL maintainer = "[email protected]"
ARG --security-opt seccomp:unconfined
ARG DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND noninteractive
#COPY --from=dorowu/ubuntu-desktop-lxde-vnc:latest / /
#COPY --from=opencog/cogutil:latest / /
#COPY --from=opencog/opencog-deps:latest / /
#COPY --from=opencog/postgres:latest / /
#COPY --from=opencog/relex:latest / /
#COPY --from=opencog/moses:latest / /
#COPY --from=synthillect/atomspace:latest / /
#COPY --from=synthillect/opencog-dev:latest / /
#COPY --from=synthillect/opencog-jupyter:latest / /
#COPY --from=synthillect/opencog-minerl:latest / /
RUN mkdir -p /usr/share/man/man1/
RUN apt-get update && apt-get --allow-unauthenticated --no-install-recommends --no-upgrade -y install \
dbus-x11 ant apache2 apt build-essential chromium-browser \
cmake default-jdk default-jre eggdrop flex gosu inotify-tools iproute2 iputils-arping iputils-ping junit4 \
libarchive-dev libboost-all-dev libdb-dev libedit-dev libgd3 libgeoip1 libgmp-dev \
libgnutls28-dev libgoogle-perftools-dev guile-3.0-dev \
graphviz libboost1.71-doc libboost-contract1.71-dev autoconf-archive \
libmpfrc++-dev libntl-dev xsltproc doxygen docbook-xml docbook-xsl fop \
libcanberra-gtk0 libcanberra-pulse libldap2-dev git fuse rng-tools geoip-bin \
libmpfr-dev openssh-server keychain libpam-ssh monkeysphere ssh-askpass ed \
ant-optional ssl-cert fakeroot libalgorithm-merge-perl libfl-dev \
libsaxon-java less manpages manpages-dev libcanberra-gtk-module \
libfile-fcntllock-perl liblocale-gettext-perl icc-profiles-free \
geoip-database libgts-bin javascript-common libtool libsocket6-perl \
libcoarrays-openmpi-dev libpam-tmpdir libpng-tools raptor2-utils \
cron netcat-openbsd netcat socat ssh-import-id rtkit \
file libatk-wrapper-java-jni fonts-dejavu-extra ncurses-term \
lmodern dvisvgm ghostscript libfile-homedir-perl liblog-log4perl-perl libyaml-tiny-perl ruby \
libice-dev libidn11-dev libjpeg-dev libkrb5-dev libllvm8 libmnl0 libnginx-mod-http-geoip libnginx-mod-http-image-filter \
libnginx-mod-http-xslt-filter libnginx-mod-mail libnginx-mod-stream libossp-uuid-dev libpcre3-dev \
libraptor2-dev libraptor2-dev libreadline-dev librtmp-dev libserd-0-0 libserd-dev libssh2-1-dev \
libssl-dev libtcmalloc-minimal4 libunwind-dev libwebp6 libxext-dev libxft-dev libxinerama-dev libxpm-dev \
libxslt1.1 libxt-dev libyaml-dev libzip-dev libzip-ocaml-dev lsb-release ncurses-dev \
nfs-common nfs-kernel-server nginx nginx-common nginx-core ninja-build nmap pkg-config psmisc \
python3-flask-api python3-gevent python3-pip rlwrap rpcbind rsync screen \
software-properties-common sudo supervisor swig tdsodbc telnet texlive-extra-utils \
tightvncserver tini traceroute tzdata unattended-upgrades unixodbc unixodbc-dev unzip \
uuid-dev vim wget x11-apps x11-utils x11proto-core-dev x11proto-dev x11proto-xext-dev \
x11proto-xinerama-dev x11vnc xauth xdotool xfonts-base xorg-sgml-doctools xterm xtrans-dev xvfb \
yarn zip zlib1g zlib1g-dev
COPY docker/rootfs /
RUN cp /dockerstartup/generate_container_user /
USER root
COPY --from=jupyter/base-notebook:latest / /
RUN mv /etc/dhcp/dhclient-enter-hooks.d/resolved /etc/dhcp/dhclient-enter-hooks.d/resolved.some
RUN mv /etc/apparmor.d/usr.bin.firefox /etc/apparmor.d/usr.bin.firefox.some
RUN apt-get -y update \
&& apt-get install -y --no-upgrade --allow-unauthenticated --no-install-recommends rlwrap dbus-x11 \
firefox
# Remove light-locker to prevent screen lock
ARG TURBOVNC_VERSION=2.2.6
RUN wget -q "https://sourceforge.net/projects/turbovnc/files/${TURBOVNC_VERSION}/turbovnc_${TURBOVNC_VERSION}_amd64.deb/download" -O turbovnc_${TURBOVNC_VERSION}_amd64.deb && \
apt-get install -y -q ./turbovnc_${TURBOVNC_VERSION}_amd64.deb && \
apt-get remove -y -q light-locker && \
rm ./turbovnc_${TURBOVNC_VERSION}_amd64.deb && \
ln -s /opt/TurboVNC/bin/* /usr/local/bin/
RUN mkdir -p /home/ubuntu
# apt-get may result in root-owned directories/files under $HOME
RUN chown -R $NB_UID:$NB_GID $HOME
ADD . /opt/install
RUN fix-permissions /opt/install ; /bin/true
RUN apt-get -y update \
&& apt-get install -y --no-upgrade --allow-unauthenticated --no-install-recommends \
firefox
# USER $NB_USER
ENV PATH="/home/ubuntu/miniconda3/bin:$PATH"
ARG PATH="/home/ubuntu/miniconda3/bin:$PATH"
RUN wget \
https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& mkdir /home/ubuntu/.conda \
&& bash Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh
RUN conda --version
#RUN cd /opt/install && \
# conda env update -n base --file environment.yml
# Jupyter
EXPOSE 1800
# SSHD
EXPOSE 22
# Apache HTTP
#EXPOSE 80
# Apache SSL
#EXPOSE 443 4443
# Ngynx
EXPOSE 4801
# Butterfly Logins
EXPOSE 4180
# SWISH
EXPOSE 3020
# Eggdrop
EXPOSE 3334
# MUD Plain Text (HTTPS/HTTP/TELNET)
EXPOSE 14100 4100 4000
# MUD with Debug (HTTPS/HTTP/TELNET)
EXPOSE 14101 4101 4001
# MUD with Graphics (HTTPS/HTTP/TELNET)
EXPOSE 14102 4102 4002
# WAM-CL REPL (HTTPS/HTTP/TELNET)
EXPOSE 14103 4103 4003
# NOMIC MU (HTTPS/HTTP/TELNET)
EXPOSE 14104 4104 4004
# Shared SWIPL ?- (HTTPS/HTTP/TELNET)
EXPOSE 14123 4123 4023
# Non-Shared SWIPL ?- (HTTPS/HTTP/TELNET)
EXPOSE 14125 4125 4025
EXPOSE 4090 4091
MAINTAINER RUN if [ ! -z "$LOGICMOO_EXTRAS" ]; \
then \
curl -O http://mirror.umd.edu/eclipse/technology/epp/downloads/release/2020-06/R/eclipse-java-2020-06-R-linux-gtk-x86_64.tar.gz \
&& tar -zxvf eclipse-java-2020-06-R-linux-gtk-x86_64.tar.gz -C /usr/ \
&& ln -s /usr/eclipse/eclipse /usr/bin/eclipse \
&& rm -f eclipse-java-2020-06-R-linux-gtk-x86_64.tar.gz \
fi
ENV HOME /root
COPY docker/rootfs /
RUN a2dismod mpm_event \
&& a2enmod macro access_compat alias auth_basic authn_core authn_file authz_core authz_host authz_user autoindex deflate dir env \
filter headers http2 mime mpm_prefork negotiation php7.4 proxy proxy_ajp proxy_balancer proxy_connect proxy_express \
proxy_fcgi proxy_fdpass proxy_ftp proxy_hcheck proxy_html proxy_http proxy_http2 proxy_scgi proxy_uwsgi proxy_wstunnel reqtimeout \
rewrite setenvif slotmem_shm socache_shmcb ssl status xml2enc ; /bin/true \
\
# confirm our webconfig works (or it exits docker build) \
&& service apache2 start && service apache2 status && service apache2 stop
# who/where
ENV LOGICMOO_WS /opt/logicmoo_workspace
ENV LOGICMOO_USER prologmud_server
ENV LOGICMOO_GAMES $LOGICMOO_WS/prologmud_server
ENV PATH "${LOGICMOO_WS}/bin:${PATH}"
ENV WNDB $LOGICMOO_WS/packs_sys/logicmoo_nlu/data/WNprolog-3.0/prolog
RUN apt-get update && apt-get install -y --allow-unauthenticated \
libtinfo5 libtinfo6
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt update \
&& apt install -y gh
COPY packs_sys/logicmoo_nlu/requirements.txt /tmp/requirements.txt
#RUN curl -sS https://bootstrap.pypa.io/get-pip.py | /usr/bin/python3.10
# install our Butterfly websockets (telnet server over httpd)
RUN \
pip install --upgrade pip ; python3 -m pip install --upgrade pip \
# && python3 -m pip uninstall setuptools ; pip install setuptools \
&& python3 -m pip install --upgrade setuptools wheel \
&& python3 -m pip install tornado asyncio \
&& python3 -m pip install butterfly \
&& python3 -m pip install butterfly[themes] # If you want to use themes \
&& python3 -m pip install butterfly[systemd] # If you want to use systemd \
&& RUN cd /etc/systemd/system \
&& curl -O https://raw.githubusercontent.com/paradoxxxzero/butterfly/master/butterfly.service \
&& curl -O https://raw.githubusercontent.com/paradoxxxzero/butterfly/master/butterfly.socket \
&& echo Maybe remember to: systemctl enable butterfly.socket \
&& echo Maybe remember to: systemctl start butterfly.socket
MAINTAINER RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& apt update \
&& apt install -y gh
# Python NLP Stuff
EXPOSE 4095 4096 4097 4098 4099
EXPOSE 5901
RUN pip3 uninstall -y nbconvert Pygments pygments ; /bin/true
RUN apt remove -y python3-pygments python3-h5py python3-packaging python3-nbconvert # python3-requests # python3-six
RUN apt remove -y python3-gevent python3-greenlet
COPY packs_sys/logicmoo_nlu/requirements.txt /tmp/requirements.txt
#RUN pip3 install --verbose -r /tmp/requirements.txt
RUN pip3 install --verbose filelock==3.4 importlib-metadata==4.4
RUN pip3 install --verbose gevent greenlet spacy nltk nbconvert jupyter jupyterlab requests six gevent.websocket
#RUN cd /opt/logicmoo_workspace/packs_web/butterfly && pip install -e .
#RUN /startup.sh Dockerfile
#CMD $LOGICMOO_WS/StartLogicmoo.sh
ENTRYPOINT ["/startup_logicmoo.sh"]
#ENTRYPOINT ["/startup.sh"]