添加deb包构建,删除容器构建
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in 8s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 15s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 19s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 37s
Build and Release / release (push) Successful in 1m8s
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in 8s
Build and Release / build-and-test (amd64, alpine) (push) Successful in 15s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 19s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 37s
Build and Release / release (push) Successful in 1m8s
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
FROM alpine:3.21
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG TARGZ_FILE_AMD64
|
||||
ARG TARGZ_FILE_ARM64
|
||||
|
||||
RUN apk update && apk add --no-cache wget
|
||||
|
||||
COPY ./app /app
|
||||
|
||||
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
||||
ARCH_FILE="$TARGZ_FILE_AMD64"; \
|
||||
elif [ "$TARGETARCH" = "arm64" ]; then \
|
||||
ARCH_FILE="$TARGZ_FILE_ARM64"; \
|
||||
else \
|
||||
echo "不支持的架构: $TARGETARCH" && exit 1; \
|
||||
fi && \
|
||||
echo "TARGETARCH: $TARGETARCH" && \
|
||||
echo "使用文件: $ARCH_FILE" && \
|
||||
ls -la /app/ && \
|
||||
tar -xzf "/app/${ARCH_FILE}" -C /app --strip-components=1 && \
|
||||
ls -la /app/ && \
|
||||
rm -rf /app/*.tar.gz /app/config.json /app/config_cc.json /app/index.html /app/xxxigServer && \
|
||||
addgroup -S xxxig && \
|
||||
adduser -S -G xxxig xxxig && \
|
||||
mkdir -p /app/data && \
|
||||
chown -R xxxig:xxxig /app && \
|
||||
chmod +x /app/xxxigDaemon /app/xxxigMiner
|
||||
|
||||
USER xxxig
|
||||
WORKDIR /app
|
||||
|
||||
ENTRYPOINT ["/app/xxxigDaemon"]
|
||||
@@ -1,78 +0,0 @@
|
||||
FROM alpine:3.21
|
||||
|
||||
ARG TARGETARCH
|
||||
ARG TARGZ_FILE_AMD64
|
||||
ARG TARGZ_FILE_ARM64
|
||||
|
||||
RUN apk update && apk add --no-cache wget gettext
|
||||
|
||||
COPY ./app /app
|
||||
|
||||
RUN if [ "$TARGETARCH" = "amd64" ]; then \
|
||||
ARCH_FILE="$TARGZ_FILE_AMD64"; \
|
||||
elif [ "$TARGETARCH" = "arm64" ]; then \
|
||||
ARCH_FILE="$TARGZ_FILE_ARM64"; \
|
||||
else \
|
||||
echo "不支持的架构: $TARGETARCH" && exit 1; \
|
||||
fi && \
|
||||
echo "TARGETARCH: $TARGETARCH" && \
|
||||
echo "使用文件: $ARCH_FILE" && \
|
||||
ls -la /app/ && \
|
||||
tar -xzf "/app/${ARCH_FILE}" -C /app --strip-components=1 && \
|
||||
ls -la /app/ && \
|
||||
rm -rf /app/*.tar.gz /app/config.json /app/config_cc.json /app/xxxigDaemon /app/xxxigMiner && \
|
||||
addgroup -S xxxig && \
|
||||
adduser -S -G xxxig xxxig && \
|
||||
mkdir -p /app/data && \
|
||||
chown -R xxxig:xxxig /app && \
|
||||
chmod +x /app/xxxigServer
|
||||
|
||||
ENV LOG_FILE=/app/data/xxxigServer.log \
|
||||
BIND_IP=0.0.0.0 \
|
||||
PORT=80 \
|
||||
USER= \
|
||||
PASS= \
|
||||
ACCESS_TOKEN= \
|
||||
TLS=false \
|
||||
CERT_FILE= \
|
||||
KEY_FILE= \
|
||||
TG_BOT_TOKEN= \
|
||||
TG_CHAT_ID=
|
||||
|
||||
COPY <<EOF /app/config.template.json
|
||||
{
|
||||
"bind-ip": "\${BIND_IP}",
|
||||
"log-file": "\${LOG_FILE}",
|
||||
"port": \${PORT},
|
||||
"user": "\${USER}",
|
||||
"pass": "\${PASS}",
|
||||
"access-token": "\${ACCESS_TOKEN}",
|
||||
"use-tls": \${TLS},
|
||||
"cert-file": "\${CERT_FILE}",
|
||||
"key-file": "\${KEY_FILE}",
|
||||
"telegram-bot-token": "\${TG_BOT_TOKEN}",
|
||||
"telegram-chat-id": "\${TG_CHAT_ID}"
|
||||
}
|
||||
EOF
|
||||
|
||||
RUN chmod 644 /app/config.template.json
|
||||
|
||||
COPY <<EOF /app/entrypoint.sh
|
||||
#!/bin/sh
|
||||
if [ ! -f /app/data/config.json ]; then
|
||||
envsubst < /app/config.template.json > /app/data/config.json
|
||||
fi
|
||||
exec "\$@"
|
||||
EOF
|
||||
|
||||
RUN chmod +x /app/entrypoint.sh
|
||||
|
||||
EXPOSE 80 443
|
||||
VOLUME /app/data \
|
||||
/app/certs
|
||||
|
||||
USER xxxig
|
||||
WORKDIR /app
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
CMD ["/app/xxxigServer", "-c", "/app/data/config.json"]
|
||||
Reference in New Issue
Block a user