feat: initial commit
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
FROM --platform=$BUILDPLATFORM golang:alpine AS build
|
||||
|
||||
RUN apk add git
|
||||
|
||||
WORKDIR /src/
|
||||
|
||||
COPY go.* /src/
|
||||
|
||||
RUN go mod download -x
|
||||
|
||||
COPY . /src
|
||||
|
||||
#Compiler Settings
|
||||
ENV CGO_ENABLED=0
|
||||
|
||||
# for full parings check out https://go.dev/doc/install/source#environment
|
||||
ENV GOOS=linux
|
||||
# this will be the target cpu arch
|
||||
# Can be amd64 arm64 386 ppc64
|
||||
ENV GOARCH=amd64
|
||||
|
||||
RUN go build -o /out/app .
|
||||
|
||||
# if you need certificates use: alpine
|
||||
# otherwise just use: scratch
|
||||
FROM alpine AS run
|
||||
|
||||
COPY --from=build /out/app /
|
||||
|
||||
# if needed
|
||||
EXPOSE 8080
|
||||
ENV VALKEY_ADDR redis:6379
|
||||
|
||||
ENTRYPOINT [ "/app" ]
|
||||
Reference in New Issue
Block a user