2015-04-28 03:05:06 +03:00
|
|
|
# This image is only meant to be built from within the build.sh script.
|
2015-10-08 14:28:52 +03:00
|
|
|
FROM debian:jessie
|
2015-04-28 03:05:06 +03:00
|
|
|
|
|
|
|
# Install dependencies
|
2015-11-01 06:53:11 +03:00
|
|
|
RUN apt-key adv --recv-keys --keyserver pgp.mit.edu 5072E1F5 \
|
|
|
|
&& echo 'deb http://repo.mysql.com/apt/debian/ jessie mysql-5.6' > /etc/apt/sources.list.d/mysql.list \
|
2015-04-28 03:05:06 +03:00
|
|
|
&& apt-get update \
|
2015-11-01 06:53:11 +03:00
|
|
|
&& DEBIAN_FRONTEND=noninteractive \
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
bzip2 \
|
|
|
|
memcached \
|
|
|
|
libmysqlclient18 \
|
|
|
|
mysql-client \
|
|
|
|
mysql-server \
|
2015-04-28 03:05:06 +03:00
|
|
|
&& 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
|
2015-11-03 06:33:25 +03:00
|
|
|
ENV LD_LIBRARY_PATH $VTROOT/dist/vt-zookeeper-3.4.6/lib
|
2015-04-28 03:05:06 +03:00
|
|
|
|
|
|
|
# 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
|