background preloader

Docker

Facebook Twitter

Chris Swan's QCon presentation "Using Docker in Cloud Networks" Docker Quicktip #2: exec it, please! Often when creating a Docker container it is necessary to do a bit of setup before starting the main process you wanted.

Docker Quicktip #2: exec it, please!

Sometimes this is just a one-time setup for the first time the container starts (setting up database users, importing data, etc), other times it’s setting up the environment to get your process going (as many init.d scripts also do). In any case some script is needed to run before running the main application that the container was created for. Let’s take an image I recently created: github: cpuguy83/docker-postgresDockerfile pgstart.sh #! There are a couple of issues with this, which I’ll address in a future post. First, let’s change CMD to ENTRYPOINT as we learned in the in the previous article. The next bit is becoming a pet-peeve of mine when using some of my older images. Why is it doing this? Let’s change the last line of pg_start to use exec instead: There we go, docker will now cleanly shutdown my postgres process instead of SIGKILLing it. Painted-Fox/docker-postgresql. Redirect Ports - Docker Documentation.

Using Docker as a Jenkins Cloud Provider at Nuxeo Blogs. As you know, I’ve started experimenting with Docker.

Using Docker as a Jenkins Cloud Provider at Nuxeo Blogs

One of the cool use cases we wanted to get in was provisioning Jenkins slaves through a Docker host. Jenkins is our continuous integration server. It runs many different jobs to build and test the various parts of the platform. These jobs are usually run on dedicated slave nodes. We have different physical machines for each but sometimes we need more nodes. Docker PostgreSQL How-To. Docker is one of the most exciting open source project right now.

Docker PostgreSQL How-To

In short, it allows to easily create lightweight, portable, self-sufficient containers that can run any application, e.g. Docker Ecosystem Mapped out. KenCochrane.net. 1 Introduction The goal of this guidebook is to introduce you to Docker, show you what it can do, and how to get it up and running on your system, and how to use it to make your life better.

KenCochrane.net

This guide is still very rough, and needs a lot of work, but because it is open source and available on github.com you can help make it better. If you would like to add to it or fix something, please fork it and submit a pull request. One of the goals of this project is to make it available as a free downloadable ebook/pdf. But, I don't want to do that until the guidebook is a little more complete, and the formatting looks much nicer. Installing Redis on Docker - John Costa's Blog. I’m currently employed by dotCloud and had an opportunity to play around with our open sourced linux container runtime project called Docker.

Installing Redis on Docker - John Costa's Blog

You’ll need to have an functional version of docker to follow these steps. I’ve included an overview of my notes for installation, however you can find additional installation instructions at the docker website. Introduction to Docker If you’ve already worked with docker, you can skip this part. You already have docker installed and probably are running your own containers. I’m working on a MBA, so I ran through the MacOS instructions which are repeated below.

First clone the repo and cd into the cloned repository: The Linux container engine. In this section we will cover the most important instructions: FROM and RUN.

the Linux container engine

We will also see how to use the docker build command and how to specify the maintainer of the Dockerfile and how to insert comments. Dockerfile instructions All Dockerfile instructions look like this: INSTRUCTION arguments Instructions are not case sensitive, but we recommend to use capital letters. The FROM instruction The first instruction of every Dockerfile needs to be the FROM instruction FROM image It sets the base image for subsequent instructions. FROM ubuntu.

Docker Examples

Vagrant, Docker and Ansible. WTF? Given that we’re building a SaaS that helps our client managing their infrastructure, our team is pretty familiar with leveraging VMs and configuration management tools.

Vagrant, Docker and Ansible. WTF?

We’ve actually been heavy users of Vagrant and Ansible for the past year, and it’s helped us tremendously normalize our development process. As our platform grew in complexity, some additional needs emerged: Docker Registry. Building a Development Environment with Docker - Terse Systems. I’ve written a cheat sheet for Docker, and I have a github project for it.

Building a Development Environment with Docker - Terse Systems

Here’s the thinking that went into why Docker, and how best to use it. The problem You want to build your own development environment from scratch, and you want it to be as close to a production environment as possible. Solutions Development environments usually just… evolve. But even when it gets to that point, it’s not over, because modern environments can involve dozens of different components, all with their own configuration, often times communicating with each other through TCP/IP or even worse, talking to a third party API like S3. Solution #1: Shared dev environment The first solution is to set up a environment with exactly the same machines in the same way as production, only scaled down for development.

This works only if there is no conflict between developers, and resource use and contention is not a problem. If you need to access the environment from outside the office, you’ll need a VPN. The Basics Tips. Ansible & Docker - The Path to Continuous Delivery I. If I had a Rails application requiring MySQL and Redis that I wanted to host myself, this is the quickest and most simple approach.

Ansible & Docker - The Path to Continuous Delivery I