From acb64a075e51dcb51dac390c18fbd24ce9f5d515 Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Sat, 27 Dec 2014 12:40:34 +0100 Subject: [PATCH] Ignore currently unused files --- .gitignore | 8 ++++- README.md | 75 ------------------------------------------- build/Dockerfile | 5 --- build/scripts/test.sh | 6 ---- setup | 28 ---------------- 5 files changed, 7 insertions(+), 115 deletions(-) delete mode 100644 README.md delete mode 100644 build/Dockerfile delete mode 100644 build/scripts/test.sh delete mode 100644 setup diff --git a/.gitignore b/.gitignore index 1fd071f..440ca53 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,7 @@ -/images/*/fs/var/* \ No newline at end of file +/fs/*/var/* +/tmp.txt +/test/ +/images/*/Dockerfile +maestro.yaml +setup +README.md diff --git a/README.md b/README.md deleted file mode 100644 index c98d081..0000000 --- a/README.md +++ /dev/null @@ -1,75 +0,0 @@ - -## Introduction -This project bundles a set of scripts to simplify the deployment of docker containers. - -The basic idea is adapted from the excellent [Ubuntu base image](https://github.com/phusion/baseimage-docker): - -- install software using bash scripts -- use a tailored init script to ensure correct startup and shutdown behavior -- use [runit](http://smarden.org/runit/) to supervise services -- provide a preconfigured SSH server -- provide a consistent way of managing environment variables - -## Installation -Make sure Docker is [installed](https://docs.docker.com/installation/) correctly, in most cases, the following command should suffice: -``` -curl http://get.docker.io | sudo sh -``` - -Then change /etc/default/docker to read: -``` -DOCKER_OPTS="-e lxc -r=false" -``` - -And make sure to restart the docker daemon. This enables LXC related tricks such as -```docker attach``` and to allows to modify networking configuration using ```--lxc-conf``` in ```docker run```. It also disables the automatic restart of previously running containers. - -## Utility scripts - -### In $DOCKER_HOME/bin - -#### app -#### attach -#### build -#### clean -#### killall -#### make -#### purge -#### run -#### ssh -#### stopall - -### In $DOCKER_HOME/images/<image>/ -#### app - -#### run - -#### ssh - - - -Images are build using Makefiles in order to provide reusable pieces of functionality. - -## Build files - -### Boot -These scripts are executed by the init script before runit starts any services. Numeric prefixes are used to enforce a specific order of execution. These scripts are used to prepare the container with live parameters from the host. It is more convenient to make service specific modifications in the respective runit scripts than to create separate boot scripts. - -### Script -These scripts are executed during the build and install the software. Numeric prefixes are used to enforce a specific order of execution. The following convention is recommended: - -- 00_ for essential modifications to the base image without which other software might fail to install. -- 01_ for essential modifications regarding the functioning of the base image. -- 02_ for system wide modifications or the installation of very general system components. -- 03_ for the installation of image specific software. -- 99_ to clean the image from unnecessary junk. - -### Runit -These scripts are executed by runit to start services. Runit requires services to run in the foreground and correct parameters must be passed to prevent the service from daemonising. These scripts are also used to initialise files and directories on host volumes. - -### Make -The Makefiles link (symbolic link) the required files (installation script, boot script and runit script) for each separate component into the build directory. These files are quite general since the aforementioned scripts for each separate component are typically named after the build target. Dependencies on other component are defined here. - -## Current limitations -- This approach does not benefit from the caching mechanisms used by Docker. The Dockerfile is generated at build time and installation scripts are added dynamically. -- There is no mechanism to keep track of software installed during the build. It would be desirable to have a *developer mode* that keeps useful software (e.g., vim, curl, wget) after the build or a *production mode* that removes this software to obtain as small an image as possible. \ No newline at end of file diff --git a/build/Dockerfile b/build/Dockerfile deleted file mode 100644 index 7cbfb1b..0000000 --- a/build/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM ubuntu:precise - -ADD build /build - -RUN for s in /build/scripts/*.sh; do [ -x $s ] && $s || : ; done \ No newline at end of file diff --git a/build/scripts/test.sh b/build/scripts/test.sh deleted file mode 100644 index 6f45136..0000000 --- a/build/scripts/test.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -set -e -source /build/config -set -x - -echo $MODE diff --git a/setup b/setup deleted file mode 100644 index 1c0b710..0000000 --- a/setup +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -set -e -# -# This script is meant for quick & easy install via: -# 'curl -sL https://raw.githubusercontent.com/Boukefalos/docker-deployment/master/setup | sh' -# or: -# 'wget -qO- https://raw.githubusercontent.com/Boukefalos/docker-deployment/master/setup | sh' - -home=/etc/environment -url='https://get.docker.io/' - -command_exists() { - command -v "$@" > /dev/null 2>&1 -} - -if !command_exists docker; then - echo Docker should be installed! - exit 0 -fi - -curl='' -if command_exists curl; then - curl='curl -sL' -elif command_exists wget; then - curl='wget -qO-' -elif command_exists busybox && busybox --list-modules | grep -q wget; then - curl='busybox wget -qO-' -fi \ No newline at end of file