forked from temporalio/temporal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
67 lines (55 loc) · 2.34 KB
/
Copy pathDockerfile
File metadata and controls
67 lines (55 loc) · 2.34 KB
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
ARG TARGET=server
ARG GOPROXY
##### Temporal builder #####
FROM temporalio/base-builder:1.0.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"]
CMD /start.sh
COPY docker/entrypoint.sh /entrypoint.sh
COPY config/dynamicconfig /etc/temporal/config/dynamicconfig
COPY docker/config_template.yaml /etc/temporal/config/config_template.yaml
COPY docker/start-temporal.sh /start-temporal.sh
COPY docker/start.sh /start.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
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 /start.sh autosetup
##### Debug configuration for Temporal with additional set of tools #####
FROM temporal-server as temporal-debug
# iproute2 contains tc, which can be used for traffic shaping in resiliancy testing.
RUN apk add iproute2
# Add debug configuration file.
COPY docker/debug-configure.sh /debug-configure.sh
# Run configuration script before the service startup.
CMD /debug-configure.sh && /start.sh autosetup
##### 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}