antosaio/Dockerfile
2022-08-05 11:13:47 +02:00

49 lines
2.0 KiB
Docker

ARG ARCH
FROM ubuntu:focal AS deploy-env
RUN apt-get update && apt-get --yes --no-install-recommends install libsqlite3-0 zlib1g libreadline8 libssl1.1 wget
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
FROM busybox:stable-glibc
#copy all necessary libraries
COPY --from=deploy-env /ulib/* /lib/
COPY --from=deploy-env /bin/wget /bin/
# copy antd-server
COPY /var/jenkins_home/workspace/ant-http/build/$ARCH/opt/* /opt/
COPY /var/jenkins_home/workspace/ant-http/build/$ARCH/usr/* /opt/
# copy lua plugin
COPY /var/jenkins_home/workspace/antd-lua-plugin/build/$ARCH/* /
# copy tunnel plugin
COPY /var/jenkins_home/workspace/antd-tunnel-plugin/build/$ARCH/* /
# publishers
COPY /var/jenkins_home/workspace/antd-tunnel-publishers/build/$ARCH/* /
# webapp
COPY /var/jenkins_home/workspace/antd-tunnel-publishers/build/opt/www/htdocs/os build/frontend/opt/www/htdocs/
COPY /var/jenkins_home/workspace/antd-tunnel-publishers/build/opt/www/htdocs/silk build/frontend/opt/www/htdocs/
COPY /var/jenkins_home/workspace/antd-tunnel-publishers/build/opt/www/htdocs/mimes.json build/frontend/opt/www/htdocs/
RUN rm -rf /opt/www/htdocs/os/rst
# antos
COPY /var/jenkins_home/workspace/antos/build/* /
RUN chown -R root:root /opt/www/htdocs/
COPY start.sh /start.sh
RUN chmod 700 /start.sh
ENTRYPOINT /start.sh