parent
741c36bd07
commit
6af1f376c2
17
Dockerfile
17
Dockerfile
@ -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
|
||||
|
25
Jenkinsfile
vendored
25
Jenkinsfile
vendored
@ -1,17 +1,5 @@
|
||||
def remote = [:]
|
||||
remote.name = 'workstation'
|
||||
remote.host = 'workstation'
|
||||
remote.user = 'dany'
|
||||
remote.identityFile = '/var/jenkins_home/.ssh/id_rsa'
|
||||
remote.allowAnyHosts = true
|
||||
remote.agent = false
|
||||
remote.logLevel = 'INFO'
|
||||
pipeline{
|
||||
agent { node{ label'master' }}
|
||||
//parameters {
|
||||
// string(defaultValue: "xsangle", name: 'dockerhub_user', description: 'Docker hub username')
|
||||
// string(defaultValue: "", name: 'dockerhub_pat', description: 'Docker hub Personal Access Token')
|
||||
//}
|
||||
agent { node{ label'workstation' }}
|
||||
options {
|
||||
// Limit build history with buildDiscarder option:
|
||||
// daysToKeepStr: history is only kept up to this many days.
|
||||
@ -32,16 +20,13 @@ pipeline{
|
||||
{
|
||||
stage('Build all') {
|
||||
steps {
|
||||
sshCommand remote: remote, command: '''
|
||||
copyArtifacts(projectName: 'gitea-sync/antos-appimage/master', target: 'antos-release');
|
||||
sh'''#! /bin/bash
|
||||
set -e
|
||||
export WORKSPACE=$(realpath "./jenkins/workspace/antosaio-docker")
|
||||
cd $WORKSPACE
|
||||
[ -d antos ] && rm -rf antos
|
||||
mkdir antos
|
||||
cp /var/jenkins_home/workspace/nightly-antosaio/build/* antos -rf
|
||||
tree antos
|
||||
tree antos-release
|
||||
docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
|
||||
for dir in antos/frontend/* ; do
|
||||
for dir in antos-release/build/* ; do
|
||||
tag=$(basename $dir)
|
||||
echo "BUILD TAG $tag"
|
||||
docker buildx build \
|
||||
|
@ -1,4 +1,4 @@
|
||||
[vterm]
|
||||
exec = /opt/www/bin/vterm
|
||||
param = /opt/www/tmp/channels/antd_hotline.sock
|
||||
param = /app/data/tmp/channels/antd_hotline.sock
|
||||
debug = 0
|
10
start.sh
10
start.sh
@ -20,9 +20,9 @@ unset ANTOS_PASSWORD
|
||||
[ ! -f "/app/antd-config.ini" ] && cp /opt/www/antd-config.ini /app/antd-config.ini
|
||||
[ ! -f "/app/runner.ini" ] && cp /opt/www/runner.ini /app/runner.ini
|
||||
|
||||
/usr/bin/antd /app/antd-config.ini >/dev/null 2>&1 | \
|
||||
# start syslog
|
||||
syslogd -O /tmp/messages
|
||||
|
||||
usr/bin/antd /app/antd-config.ini >/dev/null 2>&1 | \
|
||||
( sleep 2 && /opt/www/bin/runner /app/runner.ini >/dev/null 2>&1 &)
|
||||
#/usr/bin/antd /app/antd-config.ini &
|
||||
#sleep 2
|
||||
#[ -f /app/runner.ini ] && /opt/www/bin/runner /app/runner.ini &
|
||||
#wait
|
||||
# /bin/sh
|
Loading…
Reference in New Issue
Block a user