#!/bin/bash -x # Built with arch: amd64 flavor: lxde image: ubuntu:20.04 # ################################################################################ # base system ################################################################################ function MAINTAINER { echo SKIPPING: $* } function RUN { echo RUNing: $* $* } #FROM centminmod/docker-ubuntu-vnc-desktop #FROM dickhub/ubuntu-xfce-vnc #FROM ct2034/vnc-ros-kinetic-full #FROM tiryoh/ros2-desktop-vnc #FROM ros:noetic-desktop-full #FROM tiryoh/ros-desktop-vnc:noetic #MAINTAINER FROM dorowu/ubuntu-desktop-lxde-vnc:bionic #LABEL maintainer="Tiryoh" #FROM aicampbell/vnc-ubuntu18-xfce ##EXPOSE 80 touch /tmp/is_google_collab #USER root #LABEL maintainer = "logicmoo@gmail.com" export DEBIAN_FRONTEND=noninteractive # # from root@debian10:/opt/logicmoo_workspace # we run.. # # docker build -t logicmoo/logicmoo_starter_image:latest --no-cache --add-host=logicmoo.org:10.0.0.90 - < ./Dockerfile.distro # export LANG=C.UTF-8 export LANGUAGE=C.UTF-8 export LC_ALL=C.UTF-8 export LOGICMOO_USER=prologmud_server export LOGICMOO_WS=/opt/logicmoo_workspace export LOGICMOO_GAMES=$LOGICMOO_WS/prologmud_server mkdir -p /usr/share/man/man1 \ && apt update \ && apt install -y apt-utils 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 # apt-get install -y locales -qq && locale-gen en_AU \&& locale-gen en_AU.UTF-8 \ && dpkg-reconfigure locales \ && locale-gen C.UTF-8 \ && dpkg-reconfigure locales mkdir -p /var/lock/apache2 /var/run/apache2 /var/run/sshd /var/log/supervisor cp /etc/ssh/sshd_config /etc/ssh/sshd_config.original chmod a-w /etc/ssh/sshd_config.original echo 'root:ubuntu' | chpasswd sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config #COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf ##EXPOSE 22 80 #CMD [“/usr/bin/supervisord”] export USER=ubuntu RUN useradd --create-home --home-dir /home/ubuntu --shell /bin/bash --user-group --groups adm,sudo ubuntu && \ echo ubuntu:ubuntu | chpasswd && \ echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers export USER=root export HOME=/root ########################### # EMACS LSP SUPPORT BEGIN # ########################### #export TINI_VERSION=v0.19.0 #wget https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini -o /bin/tini #chmod +x /bin/tinia wget http://ftp.de.debian.org/debian/pool/main/t/tini/tini_0.18.0-1_amd64.deb -o /tmp/tini_0.18.0-1_amd64.deb dpkg -i i/tmp/tini_0.18.0-1_amd64.deb #RUN chmod +x run.sh #RUN chmod 777 docker-entrypoint.sh apt-get install -y software-properties-common curl gnupg2 && \ curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - && \ apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" && \ apt-get update && apt-get install -y \ vault bash && \ setcap cap_ipc_lock= /usr/bin/vault apt-get install -y -q --no-install-recommends libapache2-mod-wsgi ; /bin/true apt-get install -y -q --no-install-recommends libapache2-mod-proxy-uwsgi ; /bin/true apt-get install -y -q --no-install-recommends iputils-ping net-tools ; /bin/true apt-get install -y -q --no-install-recommends \ php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl \ php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring \ php7.4-opcache php7.4-soap php7.4-zip php7.4-intl ; /bin/true # install our Butterfly websockets (telnet server over httpd) pip install --upgrade pip ; python3 -m pip install --upgrade pip python3 -m pip uninstall -y 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 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 systemctl enable butterfly.socket systemctl start butterfly.socket # expose our used ports #EXPOSE 22 #LSP (right?) #EXPOSE 8123 5007 6001 5555 8543 #EXPOSE 4080 ##EXPOSE 443 #EXPOSE 4443 #EXPOSE 3020 4020 #EXPOSE 111 2049 ##EXPOSE 139 445 # Phase three in case we forgot any above #python3-gevent-websocket \ #python3-novnc \ #python3-flask-sockets \ #LABEL maintainer = "logicmoo@gmail.com" ################################################################################ # merge ################################################################################ #FROM system #LABEL maintainer="fcwu.tw@gmail.com" ##EXPOSE 80 #EXPOSE 4180 #EXPOSE 4022 #WORKDIR /root export HOME=/root \ SHELL=/bin/bash # HEALTHCHECK --interval=60s --timeout=10s CMD curl --fail http://127.0.0.1:6079/api/health #COPY rootfs / echo "Set disable_coredump false" >> /etc/sudo.conf # RUN useradd --create-home --home-dir /home/ubuntu --shell /bin/bash --user-group --groups adm,sudo ubuntu && \ echo ubuntu:ubuntu | chpasswd echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers export USER=ubuntu wget -O /tmp/google-chrome-stable_current_amd64.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb apt install -y /tmp/google-chrome-stable_current_amd64.deb apt-get -y install --no-install-recommends apt-utils dialog 2>&1 apt install -y npm npm install -g typescript #apt install -y mono-complete mono-4.0-gac mono-tools-devel #ENTRYPOINT ["/startup_logicmoo.sh"] #ENTRYPOINT ["/startup.sh"] #ENTRYPOINT ["/bin/sh", "-ec", "while :; do echo '.'; sleep 600 ; done"] cp -a packs_web/butterfly /tmp/butterfly/ cd /tmp/butterfly/ && pip3 install . 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 export LOGICMOO_GAMES=$LOGICMOO_WS/prologmud_server apt-get update && apt-get install -y --allow-unauthenticated \ libtinfo5 libtinfo6 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 \cp $LOGICMOO_WS/packs_sys/logicmoo_nlu/requirements.txt /tmp/requirements.txt \cp -a $LOGICMOO_WS/docker/rootfs/* /