DEPRECATED - Please check ciandt/percona repo for updated versions
1.0K
This Docker image intends to be containerized mimic solution of Acquia Memcached environment.
The source code is available under GPLv3 at Bitbucket in this link.
Our intent is to have a Docker container that mimics Acquia Memcached environment with the same version of softwares and OS.
Utilizing Docker technologies that already provides an easy way of spinning up new environments and its dependecies, this image can speed-up developers which different backgrounds and equipments to have a fast local environment allowing them to easily integrate in automated tests and deployment pipelines.
Keeping it short, this image contains the same working set of Ubuntu and Apache Memcached Acquia utilizes.
Download the image
docker pull ciandtsoftware/memcached:acquia-2016-11-08
Run a container
docker run \
--name myContainer \
--detach \
ciandtsoftware/memcached:acquia-2016-11-08
Check running containers
docker ps --all
These are the currently versions bundled in this image.
Already installed
If you just need the container there is a snippet that can help running in standalone mode.
# define variables
DOCKER_CONTAINER_NAME="myContainer"
DOCKER_IMAGE="memcached:acquia-2016-11-08"
# run your container
docker run \
--name "${DOCKER_CONTAINER_NAME}" \
--detach \
"${DOCKER_IMAGE}"
After run, you can inquiry Docker service and get the IP address and port of your newly running container named myContainer by using the following command:
docker inspect --format '{{ .NetworkSettings.IPAddress }} myContainer'
Let's suppose that the returned IP address was 172.17.0.2. Since Memcached standard port is 11211, just open a terminal and try to get the stats: access:
echo "stats" | nc 172.17.0.2 11211
Apache Memcached stats result should be returned perfectly.
Since a project is not going to use solely this container, it may need a Docker-Compose file.
Just to exercise, follow an example of this running with Apache/PHP and also both behind a Nginx proxy.
Create a new folder and fill with these 3 files and respective folders;
## Nginx proxy configuration
# https://hub.docker.com/r/jwilder/nginx-proxy/
VIRTUAL_HOST=mySite.local
## Nginx proxy configuration
# https://hub.docker.com/r/jwilder/nginx-proxy/
VIRTUAL_HOST=myMemcached.local
VIRTUAL_PORT=11211
memcached:
image: ciandtsoftware/memcached:acquia-2016-11-08
container_name: memcached
env_file: ../conf/memcached.local.env
acquia:
build: ./acquia
container_name: acquia
env_file: ../conf/acquia.local.env
links:
- memcached
nginx:
image: jwilder/nginx-proxy:latest
container_name: nginx
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- "80:80"
- "443:443"
Then just spin-up your Docker-Compose with the command:
docker-compose up -d
Inspect Nginx container IP address:
docker inspect \
--format \
"{{.NetworkSettings.Networks.bridge.IPAddress }}" \
"nginx"
Use the IP address to update hosts file. Let's suppose that was 172.17.0.2.
Then, add the entries to /etc/hosts.
172.17.0.2 acquia.local 172.17.0.2 memcached.local
And now, try to access in terminal
echo "stats" | nc memcached.local 11211
Voilà! Your project now have Memcached, Apache/PHP and Nginx up and running. \o/
We gladly invite you to contribute fixes, new features, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.
Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.
There are two parts of the documentation.
First, in the master branch, is this README.MD. It explains how this little scripts framework work and it is published on Github page.
Second, in each image version there is an additional README.MD file that explains how to use that specific Docker image version itself. Latest version is always the one seen on Docker Hub page.
We strongly encourage reading it too!
Happy coding, enjoy!!
"We develop people before we develop software" - Cesar Gon, CEO
Content type
Image
Digest
Size
199.2 MB
Last updated
almost 10 years ago
docker pull ciandtsoftware/percona