Skip to content

Commit

Permalink
fix: add ca certificates to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
gllm-dev committed Mar 28, 2024
1 parent 8832a55 commit 8876e08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM golang:1.22.0-alpine as builder
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -o app cmd/main.go

FROM scratch
WORKDIR /app
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /app/app /usr/bin/
COPY internal/infrastructure/repositories/sql/migrations /app/internal/infrastructure/repositories/sql/migrations
ENTRYPOINT ["app"]
1 change: 1 addition & 0 deletions internal/infrastructure/authenticationmgr/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func (m *Manager) IsAllowedOrigin(ctx context.Context, apiKey string, origin str

dbOrigins, err := m.repo.GetAllowedOriginsByAPIKey(ctx, apiKey)
if err != nil {

return false, err
}
m.mapOrigins[apiKey] = dbOrigins
Expand Down

0 comments on commit 8876e08

Please sign in to comment.