1
0
mirror of https://github.com/mgerb/ServerStatus synced 2026-01-08 10:32:48 +00:00

update docker files

This commit is contained in:
2024-03-03 16:06:15 -06:00
committed by Mitchell Gerber
parent e4320bcecb
commit 25ab128a58
2 changed files with 12 additions and 12 deletions

View File

@@ -1,22 +1,26 @@
FROM golang:1.14.4-alpine3.12
FROM golang:1.22-alpine3.19
WORKDIR /go/src/github.com/mgerb/ServerStatus
ADD . .
RUN apk add --no-cache git alpine-sdk
RUN go get -u github.com/golang/dep/cmd/dep
RUN dep ensure
RUN go get
RUN make linux
FROM alpine:3.12
FROM alpine:3.19
ARG UNAME="server-status"
ARG GNAME="server-status"
ARG UID=1000
ARG GID=1000
WORKDIR /server-status
COPY --from=0 /go/src/github.com/mgerb/ServerStatus/dist/ServerStatus-linux .
ENTRYPOINT ./ServerStatus-linux
RUN addgroup -g ${GID} "${GNAME}" && adduser -D -u ${UID} -G "${GNAME}" "${UNAME}" &&\
chown "${UNAME}":"${GNAME}" -R /server-status/ &&\
apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
RUN addgroup -g ${GID} "${GNAME}"
RUN adduser -D -u ${UID} -G "${GNAME}" "${UNAME}" &&\
chown "${UNAME}":"${GNAME}" -R /server-status/
USER ${UNAME}
ENTRYPOINT ./ServerStatus-linux

View File

@@ -3,9 +3,5 @@ version: "3"
services:
server-status:
image: mgerb/server-status:latest
build:
args:
UID: 1000
GID: 1000
volumes:
- ./config.json:/server-status/config.json