-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (26 loc) · 855 Bytes
/
Dockerfile
File metadata and controls
27 lines (26 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Development
FROM golang:1.24.3-alpine AS development
WORKDIR /go/src/github.com/tidepool-org/clinic
RUN apk --no-cache update && \
apk --no-cache upgrade && \
apk --no-cache add make ca-certificates tzdata && \
adduser -D tidepool && \
chown -R tidepool /go/src/github.com/tidepool-org/clinic
USER tidepool
RUN go install github.com/air-verse/air@v1.61.7
COPY --chown=tidepool . .
RUN ./build.sh
CMD ["air"]
# Production
FROM golang:1.24.3-alpine AS production
WORKDIR /go/src/github.com/tidepool-org/clinic
RUN apk --no-cache update && \
apk --no-cache upgrade && \
apk --no-cache add ca-certificates tzdata && \
adduser -D tidepool && \
chown -R tidepool /go/src/github.com/tidepool-org/clinic
USER tidepool
COPY --chown=tidepool . .
RUN ./build.sh
WORKDIR /go/src/github.com/tidepool-org/clinic/dist
CMD ["./clinic"]