This repository has been archived by the owner on May 28, 2024. It is now read-only.
forked from temporalio/temporal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
68 lines (52 loc) · 2.3 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
ARG TARGET=server
ARG GOPROXY
##### Temporal builder #####
FROM temporalio/base-builder:1.2.0 AS temporal-builder
WORKDIR /temporal
# Copy go.mod/go.sum first to build docker layer with go dependencies (to improve rebuild time).
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN make bins
##### Temporal server #####
FROM temporalio/base-server:1.0.0 AS temporal-server
WORKDIR /etc/temporal
ENV TEMPORAL_HOME /etc/temporal
ENV SERVICES "history:matching:frontend:worker"
EXPOSE 6933 6934 6935 6939 7233 7234 7235 7239
ENTRYPOINT ["./entrypoint.sh"]
COPY config/dynamicconfig /etc/temporal/config/dynamicconfig
COPY docker/config_template.yaml /etc/temporal/config/config_template.yaml
COPY docker/entrypoint.sh /etc/temporal/entrypoint.sh
COPY docker/start-temporal.sh /etc/temporal/start-temporal.sh
COPY --from=temporal-builder /temporal/tctl /usr/local/bin
COPY --from=temporal-builder /temporal/temporal-server /usr/local/bin
##### Auto setup Temporal server #####
FROM temporal-server AS temporal-auto-setup
CMD ["autosetup"]
COPY docker/auto-setup.sh /etc/temporal/auto-setup.sh
COPY --from=temporal-builder /temporal/schema /etc/temporal/schema
COPY --from=temporal-builder /temporal/temporal-cassandra-tool /usr/local/bin
COPY --from=temporal-builder /temporal/temporal-sql-tool /usr/local/bin
##### Development configuration for Temporal with additional set of tools #####
FROM temporal-auto-setup as temporal-develop
# iproute2 contains tc, which can be used for traffic shaping in resiliancy testing.
ONBUILD RUN apk add iproute2
CMD ["autosetup", "develop"]
COPY docker/setup-develop.sh /etc/temporal/setup-develop.sh
##### Temporal CLI (tctl) #####
FROM temporalio/base-server:1.0.0 AS temporal-tctl
WORKDIR /etc/temporal
ENTRYPOINT ["tctl"]
COPY --from=temporal-builder /temporal/tctl /usr/local/bin
##### Temporal admin tools #####
FROM temporalio/base-admin-tools:1.0.0 as temporal-admin-tools
WORKDIR /etc/temporal
# Keep the container running.
ENTRYPOINT ["tail", "-f", "/dev/null"]
COPY --from=temporal-builder /temporal/schema /etc/temporal/schema
COPY --from=temporal-builder /temporal/temporal-cassandra-tool /usr/local/bin
COPY --from=temporal-builder /temporal/temporal-sql-tool /usr/local/bin
COPY --from=temporal-builder /temporal/tctl /usr/local/bin
##### Build requested image #####
FROM temporal-${TARGET}