new build from release archive (#5)

Reviewed-on: #5
This commit is contained in:
dany
2022-10-05 21:21:02 +02:00
parent 741c36bd07
commit 6af1f376c2
4 changed files with 20 additions and 34 deletions

View File

@@ -1,5 +1,6 @@
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
ARG tag
RUN apt-get update && apt-get --yes --no-install-recommends install libsqlite3-0 zlib1g libreadline8 libssl1.1 wget libvncclient1 libjpeg-turbo8 openssh-client tar tree
RUN apt clean && rm -rf /var/lib/apt/lists/*
RUN mkdir /ulib
RUN cp -rf /lib/*-linux-*/libsqlite3*.so* /ulib
@@ -45,11 +46,14 @@ RUN cp -rf /lib/*-linux-*/libcom_err*.so* /ulib
RUN cp -rf /lib/*-linux-*/libkrb5support*.so* /ulib
RUN cp -rf /lib/*-linux-*/libkeyutils*.so* /ulib
# antos
RUN mkdir /platform
COPY antos/ /
RUN cp /backend/$(uname -m)/* /platform -rf
COPY antos-release/ /
RUN tar -xzf /build/$tag/AntOS_$(uname -m).tar.gz -C /platform/
RUN tree /platform
FROM busybox:stable-glibc
ARG tag
#copy all necessary libraries
COPY --from=deploy-env /ulib/ /lib/
COPY --from=deploy-env /bin/wget /bin/
@@ -61,15 +65,12 @@ COPY profile /etc/profile
RUN chmod a+x /bin/bash
# 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/$tag/ /
RUN chown -R root:root /opt/www/htdocs/
RUN rm -rf /etc/systemd
COPY start.sh /start.sh
RUN chmod 700 /start.sh
ENTRYPOINT /start.sh