-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
Copy pathDockerfile
45 lines (32 loc) · 1.21 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
ARG bootstrap_version=32
ARG image="vitess/bootstrap:${bootstrap_version}-common"
FROM "${image}"
RUN apt-get update
RUN apt-get install -y sudo curl vim jq
# Install dependencies
COPY docker/utils/install_dependencies.sh /vt/dist/install_dependencies.sh
RUN /vt/dist/install_dependencies.sh mysql80
COPY docker/local/install_local_dependencies.sh /vt/dist/install_local_dependencies.sh
RUN /vt/dist/install_local_dependencies.sh
RUN echo "source /vt/common/env.sh" >> /etc/bash.bashrc
# Allows some docker builds to disable CGO
ARG CGO_ENABLED=0
# Re-copy sources from working tree.
COPY --chown=vitess:vitess . /vt/src/vitess.io/vitess
# Build and install Vitess in a temporary output directory.
USER vitess
WORKDIR /vt/src/vitess.io/vitess
RUN make install PREFIX=/vt/install
ENV VTROOT /vt/src/vitess.io/vitess
ENV VTDATAROOT /vt/vtdataroot
ENV PATH $VTROOT/bin:$PATH
ENV PATH="/var/opt/etcd:${PATH}"
RUN mkdir /vt/local
COPY examples/local /vt/local
# Copy the vtadmin web app to the correct location and npm install
COPY --chown=vitess:vitess web /web
RUN npm install /web/vtadmin
RUN /web/vtadmin/build.sh
RUN mkdir /vt/common
COPY examples/common /vt/common
CMD cd /vt/local && ./101_initial_cluster.sh && /bin/bash