74 lines
2.6 KiB
Docker
74 lines
2.6 KiB
Docker
FROM ubuntu:focal AS deploy-env
|
|
RUN apt-get update && apt-get --yes --no-install-recommends install libsqlite3-0 zlib1g libreadline8 libssl1.1 wget libvncclient1 libjpeg-turbo8 openssh-client
|
|
RUN apt clean && rm -rf /var/lib/apt/lists/*
|
|
RUN mkdir /ulib
|
|
RUN cp -rf /lib/*-linux-*/libsqlite3* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libreadline* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libncurse* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libz* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libcrypt* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libdl* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libm* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libpthread* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libssl* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libc* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libgcc* /ulib
|
|
RUN cp -rf /lib/*-linux-*/ld* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libpcre* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libuuid* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libidn2* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libpsl* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libunistring* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libjpeg* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libvncclient* /ulib
|
|
|
|
# vnc client support
|
|
RUN cp -rf /lib/*-linux-*/libgcrypt* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libsasl2* /ulib
|
|
RUN cp -rf /lib/*-linux-*/liblzo2* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libgnutls* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libgpg-error* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libp11-kit* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libtasn1* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libnettle* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libhogweed* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libgmp* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libffi* /ulib
|
|
|
|
# sshclient
|
|
RUN cp -rf /lib/*-linux-*/libselinux* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libresolv* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libgssapi_krb5* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libkrb5* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libk5crypto* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libcom_err* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libkrb5support* /ulib
|
|
RUN cp -rf /lib/*-linux-*/libkeyutils* /ulib
|
|
|
|
RUN mkdir /platform
|
|
COPY antos/ /
|
|
RUN cp /backend/$(uname -m)/* /platform -rf
|
|
FROM busybox:stable-glibc
|
|
|
|
#copy all necessary libraries
|
|
COPY --from=deploy-env /ulib/* /lib/
|
|
COPY --from=deploy-env /bin/wget /bin/
|
|
COPY --from=deploy-env /usr/bin/ssh /bin/
|
|
COPY --from=deploy-env /usr/bin/ssh-keygen /bin/
|
|
COPY --from=deploy-env /usr/bin/ssh-copy-id /bin/
|
|
# copy backend
|
|
COPY --from=deploy-env /platform/ /
|
|
RUN rm /etc/systemd -rf
|
|
# copy frontend
|
|
COPY antd-config.ini /opt/www/antd-config.ini
|
|
COPY runner.ini /opt/www/runner.ini
|
|
RUN chmod 744 /opt/www/antd-config.ini
|
|
RUN chmod 744 /opt/www/runner.ini
|
|
COPY antos/frontend/ /
|
|
RUN chown -R root:root /opt/www/htdocs/
|
|
RUN rm -rf /etc/systemd
|
|
RUN ln -sf /bin/sh /bin/bash
|
|
COPY start.sh /start.sh
|
|
RUN chmod 700 /start.sh
|
|
ENTRYPOINT /start.sh
|