feat: initial commit
This commit is contained in:
33
misc/docker/Dockerfile
Normal file
33
misc/docker/Dockerfile
Normal file
@ -0,0 +1,33 @@
|
||||
FROM golang:1.21 AS build
|
||||
|
||||
ARG HTTP_PROXY=
|
||||
ARG HTTPS_PROXY=
|
||||
ARG http_proxy=
|
||||
ARG https_proxy=
|
||||
|
||||
RUN apt-get update && apt-get install -y build-essential git bash
|
||||
|
||||
RUN mkdir -p /src
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY go.mod .
|
||||
COPY go.sum .
|
||||
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN make ARCH_TARGETS=amd64 release
|
||||
|
||||
FROM busybox
|
||||
|
||||
COPY --from=build /src/release/server-linux-amd64 /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN mkdir ./data
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["bin/server", "-workdir", "/app", "-config", "server.yml"]
|
Reference in New Issue
Block a user