File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ COPY --from=base /vt/bin/vtctlclient /vt/bin/
3333COPY --from=base /vt/bin/vtgate /vt/bin/
3434COPY --from=base /vt/bin/vttablet /vt/bin/
3535COPY --from=base /vt/bin/vtworker /vt/bin/
36+ COPY --from=base /vt/bin/vtbackup /vt/bin/
3637
3738# copy web admin files
3839COPY --from=base $VTTOP/web /vt/web/
@@ -57,6 +58,9 @@ COPY --from=base $VTTOP/config/mycnf/backup.cnf /vt/config/mycnf/
5758# settings to support rbr
5859COPY --from=base $VTTOP/config/mycnf/rbr.cnf /vt/config/mycnf/
5960
61+ # recommended production settings
62+ COPY --from=base $VTTOP/config/mycnf/production.cnf /vt/config/mycnf/
63+
6064# add vitess user and add permissions
6165RUN groupadd -r --gid 2000 vitess && useradd -r -g vitess --uid 1000 vitess && \
6266 chown -R vitess:vitess /vt;
Original file line number Diff line number Diff line change 1+ FROM vitess/k8s AS k8s
2+
3+ FROM debian:stretch-slim
4+
5+ # Set up Vitess environment (just enough to run pre-built Go binaries)
6+ ENV VTROOT /vt
7+ ENV VTDATAROOT /vtdataroot
8+
9+ # Prepare directory structure.
10+ RUN mkdir -p /vt/bin && mkdir -p /vtdataroot
11+
12+ # Copy binaries
13+ COPY --from=k8s /vt/bin/vtbackup /vt/bin/
14+
15+ # Copy certs to allow https calls
16+ COPY --from=k8s /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
17+
18+ # Copy vitess config
19+ COPY --from=k8s /vt/config /vt/config
20+
21+ # add vitess user/group and add permissions
22+ RUN groupadd -r --gid 2000 vitess && \
23+ useradd -r -g vitess --uid 1000 vitess && \
24+ chown -R vitess:vitess /vt && \
25+ chown -R vitess:vitess /vtdataroot
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ COPY --from=builder /vt/bin/vtctlclient /vt/bin/
1515COPY --from=builder /vt/bin/vtgate /vt/bin/
1616COPY --from=builder /vt/bin/vttablet /vt/bin/
1717COPY --from=builder /vt/bin/vtworker /vt/bin/
18+ COPY --from=builder /vt/bin/vtbackup /vt/bin/
1819
1920RUN chown -R vitess:vitess /vt
2021
@@ -51,4 +52,4 @@ COPY --from=staging /vt/ /vt/
5152
5253# Create mount point for actual data (e.g. MySQL data dir)
5354VOLUME /vt/vtdataroot
54- USER vitess
55+ USER vitess
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ COPY --from=builder /vt/bin/vtctlclient /vt/bin/
1313COPY --from=builder /vt/bin/vtgate /vt/bin/
1414COPY --from=builder /vt/bin/vttablet /vt/bin/
1515COPY --from=builder /vt/bin/vtworker /vt/bin/
16+ COPY --from=builder /vt/bin/vtbackup /vt/bin/
1617
1718FROM alpine:3.8
1819
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ COPY --from=builder /vt/bin/vtctlclient /vt/bin/
1515COPY --from=builder /vt/bin/vtgate /vt/bin/
1616COPY --from=builder /vt/bin/vttablet /vt/bin/
1717COPY --from=builder /vt/bin/vtworker /vt/bin/
18+ COPY --from=builder /vt/bin/vtbackup /vt/bin/
1819
1920RUN chown -R vitess:vitess /vt
2021
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ COPY --from=builder /vt/bin/vtctlclient /vt/bin/
1515COPY --from=builder /vt/bin/vtgate /vt/bin/
1616COPY --from=builder /vt/bin/vttablet /vt/bin/
1717COPY --from=builder /vt/bin/vtworker /vt/bin/
18+ COPY --from=builder /vt/bin/vtbackup /vt/bin/
1819RUN chown -R vitess:vitess /vt
1920
2021FROM debian:stretch-slim
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ COPY --from=builder /vt/bin/vtctlclient /vt/bin/
1515COPY --from=builder /vt/bin/vtgate /vt/bin/
1616COPY --from=builder /vt/bin/vttablet /vt/bin/
1717COPY --from=builder /vt/bin/vtworker /vt/bin/
18+ COPY --from=builder /vt/bin/vtbackup /vt/bin/
1819
1920RUN chown -R vitess:vitess /vt
2021
@@ -51,4 +52,4 @@ COPY --from=staging /vt/ /vt/
5152
5253# Create mount point for actual data (e.g. MySQL data dir)
5354VOLUME /vt/vtdataroot
54- USER vitess
55+ USER vitess
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ COPY --from=builder /vt/bin/vtctlclient /vt/bin/
1515COPY --from=builder /vt/bin/vtgate /vt/bin/
1616COPY --from=builder /vt/bin/vttablet /vt/bin/
1717COPY --from=builder /vt/bin/vtworker /vt/bin/
18+ COPY --from=builder /vt/bin/vtbackup /vt/bin/
1819
1920RUN chown -R vitess:vitess /vt
2021
@@ -51,4 +52,4 @@ COPY --from=staging /vt/ /vt/
5152
5253# Create mount point for actual data (e.g. MySQL data dir)
5354VOLUME /vt/vtdataroot
54- USER vitess
55+ USER vitess
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ COPY --from=builder /vt/bin/vtctlclient /vt/bin/
1515COPY --from=builder /vt/bin/vtgate /vt/bin/
1616COPY --from=builder /vt/bin/vttablet /vt/bin/
1717COPY --from=builder /vt/bin/vtworker /vt/bin/
18+ COPY --from=builder /vt/bin/vtbackup /vt/bin/
1819
1920RUN chown -R vitess:vitess /vt
2021
@@ -51,4 +52,4 @@ COPY --from=staging /vt/ /vt/
5152
5253# Create mount point for actual data (e.g. MySQL data dir)
5354VOLUME /vt/vtdataroot
54- USER vitess
55+ USER vitess
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ COPY --from=builder /vt/bin/vtctlclient /vt/bin/
1515COPY --from=builder /vt/bin/vtgate /vt/bin/
1616COPY --from=builder /vt/bin/vttablet /vt/bin/
1717COPY --from=builder /vt/bin/vtworker /vt/bin/
18+ COPY --from=builder /vt/bin/vtbackup /vt/bin/
1819
1920RUN chown -R vitess:vitess /vt
2021
You can’t perform that action at this time.
0 commit comments