mirror of
https://github.com/mgerb/ServerStatus
synced 2026-01-09 18:52:50 +00:00
update docker files
This commit is contained in:
20
Dockerfile
20
Dockerfile
@@ -1,22 +1,26 @@
|
|||||||
FROM golang:1.14.4-alpine3.12
|
FROM golang:1.22-alpine3.19
|
||||||
|
|
||||||
WORKDIR /go/src/github.com/mgerb/ServerStatus
|
WORKDIR /go/src/github.com/mgerb/ServerStatus
|
||||||
ADD . .
|
ADD . .
|
||||||
RUN apk add --no-cache git alpine-sdk
|
RUN apk add --no-cache git alpine-sdk
|
||||||
RUN go get -u github.com/golang/dep/cmd/dep
|
RUN go get
|
||||||
RUN dep ensure
|
|
||||||
RUN make linux
|
RUN make linux
|
||||||
|
|
||||||
|
|
||||||
FROM alpine:3.12
|
FROM alpine:3.19
|
||||||
|
|
||||||
ARG UNAME="server-status"
|
ARG UNAME="server-status"
|
||||||
ARG GNAME="server-status"
|
ARG GNAME="server-status"
|
||||||
ARG UID=1000
|
ARG UID=1000
|
||||||
ARG GID=1000
|
ARG GID=1000
|
||||||
|
|
||||||
WORKDIR /server-status
|
WORKDIR /server-status
|
||||||
COPY --from=0 /go/src/github.com/mgerb/ServerStatus/dist/ServerStatus-linux .
|
COPY --from=0 /go/src/github.com/mgerb/ServerStatus/dist/ServerStatus-linux .
|
||||||
ENTRYPOINT ./ServerStatus-linux
|
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
|
||||||
RUN addgroup -g ${GID} "${GNAME}" && adduser -D -u ${UID} -G "${GNAME}" "${UNAME}" &&\
|
RUN addgroup -g ${GID} "${GNAME}"
|
||||||
chown "${UNAME}":"${GNAME}" -R /server-status/ &&\
|
RUN adduser -D -u ${UID} -G "${GNAME}" "${UNAME}" &&\
|
||||||
apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
|
chown "${UNAME}":"${GNAME}" -R /server-status/
|
||||||
|
|
||||||
USER ${UNAME}
|
USER ${UNAME}
|
||||||
|
|
||||||
|
ENTRYPOINT ./ServerStatus-linux
|
||||||
|
|||||||
@@ -3,9 +3,5 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
server-status:
|
server-status:
|
||||||
image: mgerb/server-status:latest
|
image: mgerb/server-status:latest
|
||||||
build:
|
|
||||||
args:
|
|
||||||
UID: 1000
|
|
||||||
GID: 1000
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./config.json:/server-status/config.json
|
- ./config.json:/server-status/config.json
|
||||||
|
|||||||
Reference in New Issue
Block a user