antosaio/Dockerfile

85 lines
3.8 KiB
Docker
Raw Normal View History

2021-09-20 23:29:44 +02:00
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
2021-03-26 18:34:39 +01:00
2021-09-20 23:29:44 +02:00
FROM ubuntu:focal AS build-env
2021-04-01 10:51:21 +02:00
RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get --yes --no-install-recommends install wget build-essential make libsqlite3-dev zlib1g-dev libreadline-dev libssl-dev
2021-04-01 10:03:32 +02:00
RUN mkdir /download
RUN cd /download \
2021-04-01 10:16:02 +02:00
&& wget --no-check-certificate https://github.com/lxsang/ant-http/raw/master/dist/antd-1.0.6b.tar.gz \
2021-04-01 10:03:32 +02:00
&& tar xvzf antd-1.0.6b.tar.gz \
&& rm antd-1.0.6b.tar.gz
2021-09-20 23:29:44 +02:00
RUN cd /download/antd-1.0.6b && ./configure --prefix=/usr/ && make && make install
2021-04-01 10:03:32 +02:00
RUN cd /download \
2021-04-01 10:16:02 +02:00
&& wget --no-check-certificate https://github.com/lxsang/antd-lua-plugin/raw/master/dist/lua-0.5.2b.tar.gz \
2021-04-01 10:03:32 +02:00
&& tar xvzf lua-0.5.2b.tar.gz \
2021-04-01 10:51:21 +02:00
&& rm lua-0.5.2b.tar.gz
2021-09-20 23:29:44 +02:00
RUN cd /download/lua-0.5.2b && ./configure --prefix=/opt/www && make && make install
2021-04-01 10:03:32 +02:00
RUN cd /download \
2021-04-01 10:16:02 +02:00
&& wget --no-check-certificate https://github.com/lxsang/antd-wterm-plugin/raw/master/dist/wterm-1.0.0b.tar.gz \
2021-04-01 10:03:32 +02:00
&& tar xvzf wterm-1.0.0b.tar.gz \
2021-04-01 10:51:21 +02:00
&& rm wterm-1.0.0b.tar.gz
2021-09-20 23:29:44 +02:00
RUN cd /download/wterm-1.0.0b && ./configure --prefix=/opt/www && make && make install
2021-04-01 10:03:32 +02:00
RUN cd /download \
2022-05-03 10:26:32 +02:00
&& wget --no-check-certificate https://github.com/lxsang/antd-tunnel-plugin/raw/master/dist/tunnel-0.1.3b.tar.gz \
&& tar xvzf tunnel-0.1.3b.tar.gz \
&& rm tunnel-0.1.3b.tar.gz
RUN cd /download/tunnel-0.1.3b && ./configure --prefix=/opt/www && make && make install
2021-04-01 10:03:32 +02:00
RUN cd /download \
2022-05-03 10:26:32 +02:00
&& wget --no-check-certificate https://github.com/lxsang/antd-tunnel-publishers/raw/master/dist/antd-publishers-0.1.2a.tar.gz \
&& tar xvzf antd-publishers-0.1.2a.tar.gz \
&& rm antd-publishers-0.1.2a.tar.gz
RUN cd /download/antd-publishers-0.1.2a && ./configure --prefix=/opt/www && make && make install
2021-04-01 10:03:32 +02:00
2021-09-20 23:29:44 +02:00
# download web apps
2021-04-01 10:03:32 +02:00
RUN cd /download \
2021-10-24 20:26:18 +02:00
&& wget --no-check-certificate https://github.com/lxsang/antd-web-apps/raw/master/dist/antd_web_apps.tar.gz#nothing4 \
2021-04-01 10:51:21 +02:00
&& mkdir -p y-antd-web-apps \
&& tar xvzf antd_web_apps.tar.gz -C y-antd-web-apps \
&& rm antd_web_apps.tar.gz
2021-09-20 23:29:44 +02:00
RUN rm -rf /download/z-antos
2021-04-01 10:03:32 +02:00
RUN cd /download \
2021-10-24 20:26:18 +02:00
&& wget --no-check-certificate https://github.com/lxsang/antos/raw/1.2.1/release/antos-1.2.1.tar.gz#refresh2 \
2021-04-01 10:03:32 +02:00
&& mkdir -p z-antos \
2021-10-24 20:26:18 +02:00
&& tar xvzf antos-1.2.1.tar.gz -C z-antos \
&& rm antos-1.2.1.tar.gz
2021-04-01 10:03:32 +02:00
2021-03-27 16:32:30 +01:00
FROM busybox:stable-glibc
#copy all necessary libraries
COPY --from=deploy-env /ulib/* /lib/
2021-03-27 17:40:48 +01:00
COPY --from=deploy-env /bin/wget /bin/
2020-06-26 15:51:13 +02:00
COPY --from=build-env /usr/bin/antd /usr/bin/antd
COPY --from=build-env /usr/lib/libantd* /usr/lib/
COPY --from=build-env /opt/www /opt/www
2021-04-01 10:51:21 +02:00
COPY --from=build-env /download/z-antos /opt/www/htdocs/os
COPY --from=build-env /download/y-antd-web-apps/os /opt/www/htdocs/os
COPY --from=build-env /download/y-antd-web-apps/silk /opt/www/htdocs/silk
COPY --from=build-env /download/y-antd-web-apps/mimes.json /opt/www/htdocs/
2021-09-20 23:29:44 +02:00
RUN chown -R root:root /opt/www/htdocs/
2021-03-27 16:32:30 +01:00
COPY start.sh /start.sh
RUN chmod 700 /start.sh
2021-03-24 20:27:43 +01:00
ENTRYPOINT /start.sh