Commit 0bd7bce7 authored by Parker, Peter's avatar Parker, Peter
Browse files

Initial attempt at master image.

parents
FROM docker:dind
MAINTAINER Peter Parker <parkerpg@ornl.gov>
ADD requirements.txt requirements.txt
# Install Python, pip, Docker Compose, Python packages (and their dependencies) then do a little clean-up.
RUN \
apk add --update \
python \
python-dev \
py-pip \
build-base \
libffi-dev \
openssl-dev \
&& pip install -U docker-compose \
&& pip install -r requirements.txt \
&& rm -rf /var/cache/apk/*
# About
This is a project to create the "Master" Docker-in-Docker container that will be used in some other SIS projects.
Docker-in-Docker is a mechanism that allows an installation of Docker _inside_ a container to control the _host_ installation of Docker; spawning other containers, etc.
This means that we no longer have to worry about developer machines having anything more than Docker and Bash installed -- top-level watch/test scripts, Docker Compose, `chronic`, etc., can all now be bundled as part of this project and not be a requirement of the developer before work can begin on the parent project.
# Example Usage
```bash
PROJECT_NAME=ExampleProject
MASTER_IMAGE=code.ornl.gov:4567/sis/dockermaster:{TAG}
# Basic example that runs a simple Docker command on the host.
docker run \
--privileged \
--name $PROJECT_NAME \
-v /var/run/docker.sock:/var/run/docker.sock \
--rm $MASTER_IMAGE \
docker ps;
```
# Deployment
Run the following after making your changes. (ORNL GitLab credentials and project permissions required.)
```
./build_and_deploy
```
#!/usr/bin/env bash
set -e
VERSION=0.2
docker login code.ornl.gov:4567
docker build -t code.ornl.gov:4567/sis/dockermaster:$VERSION .
docker push code.ornl.gov:4567/sis/dockermaster:$VERSION
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment