Skip to content

Commit

Permalink
working on my machine
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettladley committed Jun 11, 2024
1 parent 8c3e212 commit b30ba43
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions backend/Dockerfile.server
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM golang:1.22-alpine as builder

WORKDIR /app
RUN apk add --no-cache git

COPY . ./
RUN go install github.com/a-h/templ/cmd/templ@latest
RUN templ generate
RUN go mod tidy
COPY . .

RUN go mod download
RUN go build -tags prod -o bin/sac main.go

FROM scratch
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -o bin/sac main.go

FROM alpine:latest as release

COPY --from=builder /app/bin/sac /sac

EXPOSE 8080
ENTRYPOINT [ "/sac" ]

ENTRYPOINT [ "/sac" ]

0 comments on commit b30ba43

Please sign in to comment.