Giter Site home page Giter Site logo

docker-registry-demo's Introduction

Docker Demo

This demo gives an introduction on how to set up and use a private Docker registry. Please see my blog post for details.

The demo works in two steps. In step one, a registry and two Python images for Python 2.7 and 3.3 are build and pushed to a registry running as a Docker container. In a step two, these Python images are pulled and run. The demo is controlled by a Makefile. Please have a look at this Makefile to see the different Docker commands used.

The Docker image for the registry is production-ready and we use it at CenterDevice. You can use it for your own private Docker registry. Please have a look at the config template registry/config.yml.template and the Makefile target start-registry to customize the registry to your needs. The storage backend is set for flat files. We use S3. If you want to change the storage backend to Amazon S3, add your S3 credentials and set the environment variable SETTINGS_FLAVOR in the CMD line in registry/Dockerfile to prod.

Have fun with lightweight virtual machines made simple with Docker and feel free to contact me for any questions or comments.

Prerequisites

Docker builds upon Linux Containers (LXC) and thus only runs on Linux. In order to allow you to also play with Docker on non-Linux machines, there are two ways to run this demo, i.e., inside a Vagrant Box or directly on Linux. Please see the respective subsections below. For both cases you need to install make.

Vagrant Box

If you decide to run the demo inside a Vagrant box, please install Vagrant accordingly. The Vagrantfile provided requires Vagrant version 1.4.0 or higher, because starting from that version Docker can be automatically installed. As provider, VirtualBox is assumed. Once Vagrant is installed, just run

vagrant up; vagrant ssh cd /vagrant

in the root directory. Then follow the same instructions as for native Linux.

Native Linux

If you decide to run the demo on a native Linux, please install Docker according to your distribution. There are How-Tos for many different distributions in the Docker documentation.

Running the Demo

1. Build Images

In the first step, a Docker image for a private registry is built. The configuration file is generated from the template registry/config.yml.template. openssl and sed generate and insert an individual secret_key and create a config file. In addition, two Python images for the versions 2.7 and 3.3 are created and used as example images to push to and pull from the registry.

make build

2. Run Demo

In order to run the demo, run

make demo

3. Clean

To clean up, run

make clean

docker-registry-demo's People

Contributors

lukaspustina avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.