зеркало из https://github.com/github/vitess-gh.git
35 строки
1.1 KiB
Docker
35 строки
1.1 KiB
Docker
# This image is only meant to be built from within the build.sh script.
|
|
FROM debian:jessie
|
|
|
|
# Install dependencies
|
|
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db \
|
|
&& echo 'deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/debian jessie main' > /etc/apt/sources.list.d/mariadb.list \
|
|
&& apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
bzip2 \
|
|
memcached \
|
|
mariadb-server \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set up Vitess environment (just enough to run pre-built Go binaries)
|
|
ENV VTTOP /vt/src/github.com/youtube/vitess
|
|
ENV VTROOT /vt
|
|
ENV GOTOP $VTTOP/go
|
|
ENV VTDATAROOT $VTROOT/vtdataroot
|
|
ENV GOBIN $VTROOT/bin
|
|
ENV GOPATH $VTROOT
|
|
ENV PATH $VTROOT/bin:$PATH
|
|
ENV VT_MYSQL_ROOT /usr
|
|
ENV PKG_CONFIG_PATH $VTROOT/lib
|
|
ENV LD_LIBRARY_PATH $VTROOT/dist/vt-zookeeper-3.4.6/lib
|
|
|
|
# Copy binaries (placed by build.sh)
|
|
COPY lite/vt /vt
|
|
|
|
# Create vitess user
|
|
RUN groupadd -r vitess && useradd -r -g vitess vitess && \
|
|
mkdir -p /vt/vtdataroot && chown -R vitess:vitess /vt
|
|
|
|
# Create mount point for actual data (e.g. MySQL data dir)
|
|
VOLUME /vt/vtdataroot
|