forked from percona/orchestrator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (34 loc) · 1.86 KB
/
Dockerfile
File metadata and controls
43 lines (34 loc) · 1.86 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
# Requires Docker 17.09 or later (multi stage builds)
#
# Orchestrator will look for a configuration file at /etc/orchestrator.conf.json.
# It will listen on port 3000.
# If not present a minimal configuration will be generated using the following environment variables:
#
# Default variables which can be used are:
#
# ORC_TOPOLOGY_USER (default: orchestrator): username used by orchestrator to login to MySQL when polling/discovering
# ORC_TOPOLOGY_PASSWORD (default: orchestrator): password needed to login to MySQL when polling/discovering
# ORC_DB_HOST (default: orchestrator): orchestrator backend MySQL host
# ORC_DB_PORT (default: 3306): port used by orchestrator backend MySQL server
# ORC_DB_NAME (default: orchestrator): database named used by orchestrator backend MySQL server
# ORC_USER (default: orc_server_user): username used to login to orchestrator backend MySQL server
# ORC_PASSWORD (default: orc_server_password): password used to login to orchestrator backend MySQL server
FROM golang:1.25.7-alpine3.22 as build
ENV GOPATH=/tmp/go
RUN apk --no-cache add libcurl rsync gcc g++ build-base bash git
RUN mkdir -p $GOPATH/src/github.com/openark/orchestrator
WORKDIR $GOPATH/src/github.com/openark/orchestrator
COPY . .
RUN bash build.sh -b -P
RUN rsync -av $(find /tmp/orchestrator-release -type d -name orchestrator -maxdepth 2)/ /
RUN rsync -av $(find /tmp/orchestrator-release -type d -name orchestrator-client -maxdepth 2)/ /
RUN cp conf/orchestrator-sample-sqlite.conf.json /etc/orchestrator.conf.json
FROM alpine:3.20
RUN apk --no-cache add bash curl jq
EXPOSE 3000
COPY --from=build /usr/local/orchestrator /usr/local/orchestrator
COPY --from=build /usr/bin/orchestrator-client /usr/bin/orchestrator-client
COPY --from=build /etc/orchestrator.conf.json /etc/orchestrator.conf.json
WORKDIR /usr/local/orchestrator
ADD docker/entrypoint.sh /entrypoint.sh
CMD /entrypoint.sh