forked from rls-moe/nyx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (26 loc) · 684 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM golang:1.14-buster AS build-env
COPY . ${GOPATH}/src/github.com/rls-moe/nyx
WORKDIR ${GOPATH}/src/github.com/rls-moe/nyx
RUN go build -o $GOPATH/bin/nyx
FROM debian:bullseye
LABEL maintainer="[email protected]"
EXPOSE 8080
RUN groupadd \
--gid 1000 \
nyx && \
useradd \
--home-dir /opt/nyx \
--comment "Nyx Board" \
--gid nyx \
--create-home \
--no-user-group \
--uid 1000 \
--shell /bin/bash \
nyx
COPY --from=build-env /go/bin/nyx /opt/nyx/nyx
COPY --from=build-env /go/src/github.com/rls-moe/nyx/config.example.yml /opt/nyx/config.yml
RUN chown -R \
nyx:nyx /opt/nyx
WORKDIR /opt/nyx
USER nyx
CMD [ "/opt/nyx/nyx" ]