-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
51 lines (34 loc) · 1.17 KB
/
Dockerfile
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
ARG BUILDER_IMAGE=golang:1.21-alpine3.19
ARG BASE_SERVER_IMAGE=temporalio/server:1.23.0
ARG BASE_AUTO_SETUP_IMAGE=temporalio/auto-setup:1.23.0
##### Builder #####
FROM ${BUILDER_IMAGE} as builder
WORKDIR /build
# build
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /temporal-server ./server/main.go
RUN go install github.com/pressly/goose/v3/cmd/[email protected]
##### Temporal server #####
FROM ${BASE_SERVER_IMAGE} as temporal-server-ydb
WORKDIR /etc/temporal
# binaries
COPY --from=builder /temporal-server /usr/local/bin
# configs
COPY ./docker/config/config_template.yaml /etc/temporal/config/config_template.yaml
### Server auto-setup image ###
FROM ${BASE_AUTO_SETUP_IMAGE} as temporal-server-ydb-auto-setup
WORKDIR /etc/temporal
# binaries
# temporal-ydb binary
COPY --from=builder /temporal-server /usr/local/bin
# goose binary
COPY --from=builder /go/bin/goose /usr/local/bin
USER temporal
# configs
COPY ./docker/config/config_template.yaml /etc/temporal/config/config_template.yaml
# schema
COPY --chown=temporal:temporal ./schema /etc/temporal/schema/ydb
## scripts
COPY ./docker/auto-setup.sh /etc/temporal/auto-setup.sh