Dockerizing PostgreSQL

Dockerizing PostgreSQL Note: - If you don’t like sudo then see Giving non-root access Installing PostgreSQL on Docker Assuming there is no Docker image that suits your needs on the Docker Hub, you can create one yourself. Start by creating a new Dockerfile: Note: This PostgreSQL setup is for development-only purposes. Refer to the PostgreSQL documentation to fine-tune these settings so that it is suitably secure. # # example Dockerfile for https://docs.docker.com/examples/postgresql_service

Driver options and operating system defaults

Driver options and operating system defaults When Docker Machine provisions containers on local network provider or with a remote, cloud provider such as Amazon Web Services, you must define both the driver for your provider and a base operating system. There are over 10 supported drivers and a generic driver for adding machines for other providers. Each driver has a set of options specific to that provider. These options provide information to machine such as connection credentials, ports, and

Dockerizing MongoDB

Dockerizing MongoDB Introduction In this example, we are going to learn how to build a Docker image with MongoDB pre-installed. We’ll also see how to push that image to the Docker Hub registry and share it with others! Note: This guide will show the mechanics of building a MongoDB container, but you will probably want to use the official image on Docker Hub Using Docker and containers for deploying MongoDB instances will bring several benefits, such as: Easy to maintain, highly configurable M

Dockerizing an apt-cacher-ng service

Dockerizing an apt-cacher-ng service Note: - If you don’t like sudo then see Giving non-root access. - If you’re using OS X or docker via TCP then you shouldn’t use sudo. When you have multiple Docker servers, or build unrelated Docker containers which can’t make use of the Docker build cache, it can be useful to have a caching proxy for your packages. This container makes the second download of any package almost instant. Use the following Dockerfile: # # Build: docker build -t apt-cacher .

Dockerizing an SSH service

Dockerizing an SSH daemon service Build an eg_sshd image The following Dockerfile sets up an SSHd service in a container that you can use to connect to and inspect other container’s volumes, or to get quick access to a test container. # sshd # # VERSION 0.0.2 FROM ubuntu:14.04 MAINTAINER Sven Dowideit <SvenDowideit@docker.com> RUN apt-get update && apt-get install -y openssh-server RUN mkdir /var/run/sshd RUN echo 'root:screencast' | chpasswd RUN sed -i 's/PermitRo

Dockerizing a Riak service

Dockerizing a Riak service The goal of this example is to show you how to build a Docker image with Riak pre-installed. Creating a Dockerfile Create an empty file called Dockerfile: $ touch Dockerfile Next, define the parent image you want to use to build your image on top of. We’ll use Ubuntu (tag: trusty), which is available on Docker Hub: # Riak # # VERSION 0.1.1 # Use the Ubuntu base image provided by dotCloud FROM ubuntu:trusty MAINTAINER Hector Castro hector@basho.com After that,

Dockerizing a Redis service

Dockerizing a Redis service Very simple, no frills, Redis service attached to a web application using a link. Create a Docker container for Redis Firstly, we create a Dockerfile for our new Redis image. FROM ubuntu:14.04 RUN apt-get update && apt-get install -y redis-server EXPOSE 6379 ENTRYPOINT ["/usr/bin/redis-server"] Next we build an image from our Dockerfile. Replace <your username> with your own user name. $ docker build -t <your username>/redis

Dockerizing a CouchDB service

Dockerizing a CouchDB service Note: - If you don’t like sudo then see Giving non-root access Here’s an example of using data volumes to share the same data between two CouchDB containers. This could be used for hot upgrades, testing different versions of CouchDB on the same data, etc. Create first database Note that we’re marking /var/lib/couchdb as a data volume. $ COUCH1=$(docker run -d -p 5984 -v /var/lib/couchdb shykes/couchdb:2013-05-03) Add data to the first database We’re assuming you

Dockerizing a Couchbase service

Dockerizing a Couchbase service This example shows how to start a Couchbase server using Docker Compose, configure it using its REST API, and query it. Couchbase is an open source, document-oriented NoSQL database for modern web, mobile, and IoT applications. It is designed for ease of development and Internet-scale performance. Start Couchbase server Couchbase Docker images are published at Docker Hub. Start Couchbase server as: docker run -d --name db -p 8091-8093:8091-8093 -p 11210:11210 cou

Dockerfile reference

Dockerfile reference Docker can build images automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build users can create an automated build that executes several command-line instructions in succession. This page describes the commands you can use in a Dockerfile. When you are done reading this page, refer to the Dockerfile Best Practices for a tip-orie