rogueserver/Dockerfile
Up a8502fcd3f
add GitHub actions workflows and build docker image (#9)
* add default values for CLI args

* add development docker compose file

* prevent crash if userdata dir does not exist

* accounts, acccountStats

* account stats and create db indices

* compensations and daily runs

* ensure uniqueness of daily seed

* start on port 8001 by default for client parity

* add GitHub actions scripts and dockerfile

* add os architecture

* only build docker image on main repo

* add example compose file
2024-05-10 15:47:22 -04:00

30 lines
405 B
Docker

ARG GO_VERSION=1.22
FROM golang:${GO_VERSION} AS builder
WORKDIR /src
COPY ./go.mod /src/
COPY ./go.sum /src/
RUN go mod download && go mod verify
COPY . /src/
RUN CGO_ENABLED=0 \
go build -o rogueserver
RUN chmod +x /src/rogueserver
# ---------------------------------------------
FROM scratch
WORKDIR /app
COPY --from=builder /src/rogueserver .
EXPOSE 8001
ENTRYPOINT ["./rogueserver"]