forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Docker images for Percona Server.
- Loading branch information
Showing
6 changed files
with
108 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM vitess/bootstrap:percona | ||
|
||
# Clear out old tree from bootstrap image. | ||
USER root | ||
RUN rm -rf /vt/src/github.com/youtube/vitess | ||
|
||
# Re-copy sources from working tree | ||
COPY . /vt/src/github.com/youtube/vitess | ||
|
||
# Fix permissions | ||
RUN chown -R vitess:vitess /vt | ||
USER vitess | ||
|
||
# Build Vitess | ||
RUN make build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM vitess/bootstrap:common | ||
|
||
# Install Percona 5.6 | ||
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net \ | ||
--recv-keys 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A && \ | ||
add-apt-repository 'deb http://repo.percona.com/apt jessie main' && \ | ||
{ \ | ||
echo debconf debconf/frontend select Noninteractive; \ | ||
echo percona-server-server-5.6 percona-server-server/root_password password 'unused'; \ | ||
echo percona-server-server-5.6 percona-server-server/root_password_again password 'unused'; \ | ||
} | debconf-set-selections && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
percona-server-server-5.6 libperconaserverclient18.1-dev && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Bootstrap Vitess | ||
WORKDIR /vt/src/github.com/youtube/vitess | ||
USER vitess | ||
ENV MYSQL_FLAVOR MySQL56 | ||
RUN ./bootstrap.sh --skip_root_installs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This image is only meant to be built from within the build.sh script. | ||
FROM debian:jessie | ||
|
||
# Install dependencies | ||
RUN apt-key adv --keyserver ha.pool.sks-keyservers.net \ | ||
--recv-keys 430BDF5C56E7C94E848EE60C1C4CBDCDCD2EFD2A && \ | ||
echo 'deb http://repo.percona.com/apt jessie main' > /etc/apt/sources.list.d/mysql.list && \ | ||
{ \ | ||
echo debconf debconf/frontend select Noninteractive; \ | ||
echo percona-server-server-5.6 percona-server-server/root_password password 'unused'; \ | ||
echo percona-server-server-5.6 percona-server-server/root_password_again password 'unused'; \ | ||
} | debconf-set-selections && \ | ||
apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
percona-server-server-5.6 bzip2 memcached && \ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters