mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-10 18:05:48 +02:00
feat: multi platform docker build
This commit is contained in:
parent
f69fadc4b7
commit
41ced2ea05
3 changed files with 39 additions and 19 deletions
|
@ -1,5 +1,7 @@
|
|||
# CGO_ENABLED=1 GOOS=linux CC=x86_64-unknown-linux-gnu-gcc CXX=x86_64-unknown-linux-gnu-g++ GOARCH=amd64 go build -ldflags "-X 'github.com/0xJacky/Nginx-UI/server/settings.buildTime=$(date +%s)'" -o nginx-ui -v main.go
|
||||
FROM --platform=linux/amd64 uozi/nginx-ui-base:latest
|
||||
FROM --platform=$TARGETPLATFORM uozi/nginx-ui-base:latest
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
WORKDIR /app
|
||||
EXPOSE 80 443
|
||||
|
||||
|
@ -7,7 +9,7 @@ COPY resources/docker/start.sh /app/start.sh
|
|||
COPY resources/docker/nginx.conf /usr/etc/nginx/nginx.conf
|
||||
COPY resources/docker/nginx-ui.conf /usr/etc/nginx/conf.d/nginx-ui.conf
|
||||
COPY resources/docker/nginx-ui.conf /etc/nginx/conf.d/nginx-ui.conf
|
||||
COPY nginx-ui /app/nginx-ui
|
||||
COPY nginx-ui-$TARGETOS-$TARGETARCH$TARGETVARIANT/nginx-ui /app/nginx-ui
|
||||
|
||||
RUN cd /app && chmod a+x /app/start.sh \
|
||||
&& rm -f /etc/nginx/conf.d/default.conf \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue