mirror of
https://github.com/nitezs/sub2sing-box.git
synced 2024-12-23 13:44:42 -05:00
💥 Remvoe default templates in docker image\n🐛 Fix version command error
This commit is contained in:
parent
0699e5aa70
commit
ca91db3c6f
@ -5,14 +5,11 @@ WORKDIR /app
|
||||
COPY . .
|
||||
RUN go mod download
|
||||
ARG version
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X sub2sing-box/constant.Version=${version}" -o sub2sing-box .
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X github.com/nitezs/sub2sing-box/constant.Version=${version}" -o sub2sing-box .
|
||||
WORKDIR /app
|
||||
|
||||
FROM alpine:latest
|
||||
COPY --from=builder /app/sub2sing-box /app/sub2sing-box
|
||||
COPY --from=builder /app/templates /app/templates-origin
|
||||
COPY --from=builder /app/entrypoint.sh /app/entrypoint.sh
|
||||
RUN chmod +x /app/entrypoint.sh
|
||||
VOLUME [ "/app/templates" ]
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
CMD ["/app/sub2sing-box", "server"]
|
||||
|
@ -56,8 +56,9 @@
|
||||
</div>
|
||||
<!-- Template Section -->
|
||||
<div class=" section">
|
||||
<h3>模板</h3>
|
||||
<mdui-text-field label="模板" type="text" id="template" name="template" />
|
||||
<h3><a href="https://github.com/nitezs/sub2sing-box/tree/master/templates">模板</a></h3>
|
||||
<mdui-text-field label="模板" type="text" id="template" name="template"
|
||||
value="https://raw.githubusercontent.com/nitezs/sub2sing-box/refs/heads/master/templates/example-windows.json" />
|
||||
</div>
|
||||
|
||||
<div id="form">
|
||||
|
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
if [ ! -d "/app/templates" ]; then
|
||||
mkdir /app/templates
|
||||
fi
|
||||
if [ -z "$(ls -A /app/templates)" ]; then
|
||||
cp -r /app/templates-origin/* /app/templates
|
||||
fi
|
||||
cd /app
|
||||
/app/sub2sing-box server
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"log": {
|
||||
"level": "trace",
|
||||
"level": "info",
|
||||
"timestamp": true
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"log": {
|
||||
"level": "trace",
|
||||
"level": "info",
|
||||
"timestamp": true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user