Experimental Percona Docker images for Percona Server

PREVIOUS POST
NEXT POST

Percona DockerDocker is incredibly popular tool for deploying software, so we decided to provide a Percona Docker image for both Percona Server MySQL and Percona Server for MongoDB.

We want to create an easy way to try our products.

There are actually some images available from https://hub.docker.com/_/percona/, but these images are provided by Docker itself, not from Percona.

In our images, we provide all the varieties of storage engines available in Percona Server (MySQL/MongoDB).

Our images are available from https://hub.docker.com/r/percona/.

The simplest way to get going is to run the following:

for Percona Server/MySQL, and:

for Percona Server/MongoDB.

It is very easy to try the different storage engines that comes with Percona Server for MongoDB. For example, to use RocksDB, run:

or PerconaFT:

We are looking for any feedback  you’d like to provide: if this is useful, and what improvements we could make.

PREVIOUS POST
NEXT POST

Share this post

Comments (19)

  • laby Reply

    What is the difference between your image and docker’s image ?

    February 2, 2016 at 2:56 pm
    • Vadim Tkachenko Reply

      Most significant change is that you can choose to install TokuDB engine during docker run command.
      Another change is that our image is centos7 based, not debian based.

      February 2, 2016 at 7:11 pm
  • Giuseppe Maxia Reply

    Thanks for publishing these images.
    I have a few questions:
    1) Why is the percona-server image almost twice the size of mysql-server?
    2) The description on docker hub says that TokuDB is already enabled, but it does not show up in “show engines.” What should users do to enable it?
    3) Recently the MySQL team has introduced a change to allow passing a file containing a password rather than the password instead. Could you do the same?
    4) Where is the source code of the image?
    5) Is a 5.7 version of the image coming along?

    Thanks

    Giuseppe

    February 4, 2016 at 1:26 pm
    • Vadim Tkachenko Reply

      Giuseppe,

      Thanks for the interest.

      1) I am not really sure about size, I think MySQL may strip debug symbols. I need to investigate more if this is a big problem
      2) This is not properly documented yet. you need to run docker with -e INIT_TOKUDB=1 to initialize TokuDB
      3) I will look into passing file with the password
      4) sources are there Source code is https://github.com/percona/percona-docker/tree/master/percona-server
      5) Sure, we will do Percona Server 5.7 images as soon as it gets GA. Should be fairly soon.

      Thanks,
      Vadim

      February 4, 2016 at 1:38 pm
      • Giuseppe Maxia Reply

        Vadim,
        Thanks for your quick answer.
        The size is important as it determines the speed of download and deployment.

        Where should I report a bug? Enabling TokuDB made the container fail.

        February 4, 2016 at 2:05 pm
        • Vadim Tkachenko Reply

          Giuseppe,

          As this is mostly playground yet, please leave your bug report here.
          I suspect it is related to hugepages not being disabled…

          February 4, 2016 at 3:05 pm
  • Giuseppe Maxia Reply

    Experimental bug report:

    After running
    time docker run –name mybox -e MYSQL_ROOT_PASSWORD=secret -d -e INIT_TOKUDB=1 percona/percona-server

    the container fails. At the end of ‘docker logs mybox’, I get:

    Version: ‘5.6.28-76.1’ socket: ‘/var/lib/mysql/mysql.sock’ port: 0 Percona Server (GPL), Release 76.1, Revision 5759e76
    Warning: Unable to load ‘/usr/share/zoneinfo/iso3166.tab’ as time zone. Skipping it.
    Warning: Unable to load ‘/usr/share/zoneinfo/zone.tab’ as time zone. Skipping it.
    which: no sestatus in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
    Checking if Percona Server is running with jemalloc enabled…
    WARNING: The file /proc/64/environ is not readable so impossible to check LD_PRELOAD for jemalloc.
    Possibly running inside container so assuming jemalloc is preloaded and continuing…
    If there will be an error during plugin installation try to restart mysql service and run this script again.

    Checking transparent huge pages status on the system…
    INFO: Transparent huge pages are enabled (should be disabled).

    Checking if thp-setting=never option is already set in config file…
    INFO: Option thp-setting=never is not set in the config file.
    (needed only if THP is not disabled permanently on the system)

    Checking TokuDB engine plugin status…
    INFO: TokuDB engine plugin is not installed.

    Disabling transparent huge pages for the current session…
    /usr/bin/ps_tokudb_admin: line 348: /sys/kernel/mm/transparent_hugepage/defrag: Read-only file system
    /usr/bin/ps_tokudb_admin: line 351: /sys/kernel/mm/transparent_hugepage/enabled: Read-only file system
    ERROR: Failed to disable transparent huge pages for this session.

    February 4, 2016 at 4:21 pm
    • Vadim Tkachenko Reply

      Giuseppe,

      That’s indeed what I suspected.

      Please execute on the host system before starting container:

      echo never >
      /sys/kernel/mm/transparent_hugepage/enabled
      echo never > /sys/kernel/mm/transparent_hugepage/defrag

      Unfortunately I can’t do from inside container.
      I only need to document this.

      February 4, 2016 at 4:26 pm
      • Giuseppe Maxia Reply

        Vadim,
        you can fix this issue at run time with the following commands, without touching the host environment:

        echo never > never.txt
        docker run \
        –name mybox \
        -e MYSQL_ROOT_PASSWORD=secret -d \
        -e INIT_TOKUDB=1 \
        -v $PWD/never.txt:/sys/kernel/mm/transparent_hugepage/defrag \
        -v $PWD/never.txt:/sys/kernel/mm/transparent_hugepage/enabled \
        percona/percona-server

        This way, the container will see your local file instead of the corresponding one from the host.

        February 4, 2016 at 4:40 pm
  • Jeff Palmer Reply

    Vadim, This is less of a percona specific thing, and more of a docker/docker hub thing, but I’d love to see you guys using automated docker hub builds so everytime you checkin to git, a new image is created. Additionally, it’d be kind of great if you could make the CentOS image a dependancy, so that when they update their image (generally with security enhancements) the percona image also gets updated automatically.

    February 8, 2016 at 12:12 am
    • Vadim Tkachenko Reply

      Jeff,

      I’ve added that, but at this moment Docker hub builds fail, as hub is using Docker 1.8, while in my Docker file I use ARG, which seems supported only in Docker 1.9.

      February 8, 2016 at 2:17 pm
  • Oleg Dolgarev Reply

    Hello Vadim,
    I tried to start mongo with PerconaFT/RocksDB engines:
    docker run –name psmdbperconaft -d percona/percona-server-mongodb:latest –storageEngine=PerconaFT
    But container does not work. Without –storageEngine option it works well.
    Why?

    March 31, 2016 at 8:18 am
  • shantanu oak Reply

    TokuDB does not start with this command…

    docker run -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e INIT_TOKUDB=1 -d percona/percona-server

    Log is available here…

    https://gist.github.com/shantanuo/35832764d58f3b1dfa7b035c248c2bf6

    July 2, 2016 at 10:30 am
    • Vadim Tkachenko Reply

      Thanks for the report, I’ve fixed TokuDB in the latest image – please check again

      July 7, 2016 at 6:23 pm
  • Srinivas Reply

    Is there any additional benefit of using your docker image compared to standard docker version of Percona (from https://hub.docker.com/_/percona/) ? Because standard mysqld options support specification of storage engine

    February 20, 2017 at 3:25 am

Leave a Reply