mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
add circleci
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
This commit is contained in:
parent
e53d64c7af
commit
cb791cab29
|
@ -1,8 +1,10 @@
|
||||||
## dockerfiles
|
## dockerfiles
|
||||||
|
|
||||||
|
[![Circle CI](https://circleci.com/gh/jfrazelle/dockerfiles.svg?style=svg)](https://circleci.com/gh/jfrazelle/dockerfiles)
|
||||||
|
|
||||||
This is a repo to hold various Dockerfiles for images I create.
|
This is a repo to hold various Dockerfiles for images I create.
|
||||||
|
|
||||||
I try to make sure each has a command at the top for running it,
|
I try to make sure each has a command at the top for running it,
|
||||||
if a file you are looking at does not have a command, please
|
if a file you are looking at does not have a command, please
|
||||||
pull request it!
|
pull request it!
|
||||||
|
|
||||||
|
|
7
circle.yml
Normal file
7
circle.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
machine:
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
test:
|
||||||
|
override:
|
||||||
|
- ./test.sh
|
|
@ -5,6 +5,7 @@
|
||||||
# -p 5050:5050 \
|
# -p 5050:5050 \
|
||||||
# -v /etc/localtime:/etc/localtime:ro \
|
# -v /etc/localtime:/etc/localtime:ro \
|
||||||
# -v /volumes/couchpotato:/data \
|
# -v /volumes/couchpotato:/data \
|
||||||
|
# --link transmission:transmission \
|
||||||
# --name couchpotato \
|
# --name couchpotato \
|
||||||
# jess/couchpotato
|
# jess/couchpotato
|
||||||
#
|
#
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
# -p 8081:8081 \
|
# -p 8081:8081 \
|
||||||
# -v /etc/localtime:/etc/localtime:ro \
|
# -v /etc/localtime:/etc/localtime:ro \
|
||||||
# -v /volumes/sickbeard:/data \
|
# -v /volumes/sickbeard:/data \
|
||||||
|
# --link transmission:transmission \
|
||||||
# --name sickbeard \
|
# --name sickbeard \
|
||||||
# jess/sickbeard
|
# jess/sickbeard
|
||||||
#
|
#
|
||||||
|
|
48
test.sh
Executable file
48
test.sh
Executable file
|
@ -0,0 +1,48 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# this is kind of an expensive check, so let's not do this twice if we
|
||||||
|
# are running more than one validate bundlescript
|
||||||
|
VALIDATE_REPO='https://github.com/jfrazelle/dockerfiles.git'
|
||||||
|
VALIDATE_BRANCH='master'
|
||||||
|
|
||||||
|
VALIDATE_HEAD="$(git rev-parse --verify HEAD)"
|
||||||
|
|
||||||
|
git fetch -q "$VALIDATE_REPO" "refs/heads/$VALIDATE_BRANCH"
|
||||||
|
VALIDATE_UPSTREAM="$(git rev-parse --verify FETCH_HEAD)"
|
||||||
|
|
||||||
|
VALIDATE_COMMIT_DIFF="$VALIDATE_UPSTREAM...$VALIDATE_HEAD"
|
||||||
|
|
||||||
|
validate_diff() {
|
||||||
|
if [ "$VALIDATE_UPSTREAM" != "$VALIDATE_HEAD" ]; then
|
||||||
|
git diff "$VALIDATE_COMMIT_DIFF" "$@"
|
||||||
|
else
|
||||||
|
git diff HEAD~ "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# get the dockerfiles changed
|
||||||
|
IFS=$'\n'
|
||||||
|
files=( $(validate_diff --name-only -- '*Dockerfile') )
|
||||||
|
unset IFS
|
||||||
|
|
||||||
|
# build the changed dockerfiles
|
||||||
|
for f in "${files[@]}"; do
|
||||||
|
image=${f%Dockerfile}
|
||||||
|
base=${image%%\/*}
|
||||||
|
suite=${image##*\/}
|
||||||
|
build_dir=$(dirname $f)
|
||||||
|
|
||||||
|
if [[ -z "$suite" ]]; then
|
||||||
|
suite=latest
|
||||||
|
fi
|
||||||
|
|
||||||
|
(
|
||||||
|
set -x
|
||||||
|
docker build -t ${base}:${suite} ${build_dir}
|
||||||
|
)
|
||||||
|
|
||||||
|
echo " --- "
|
||||||
|
echo "Successfully built ${base}:${suite} with context ${build_dir}"
|
||||||
|
echo " --- "
|
||||||
|
done
|
|
@ -3,7 +3,7 @@
|
||||||
# docker run -v /tmp/.X11-unix:/tmp/.X11-unix \
|
# docker run -v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||||
# -v /dev/snd:/dev/snd \
|
# -v /dev/snd:/dev/snd \
|
||||||
# -e DISPLAY=unix$DISPLAY \
|
# -e DISPLAY=unix$DISPLAY \
|
||||||
# jess/tor-browser
|
# jess/tor-browser:alpha
|
||||||
#
|
#
|
||||||
FROM debian:jessie
|
FROM debian:jessie
|
||||||
MAINTAINER Jessica Frazelle <jess@docker.com>
|
MAINTAINER Jessica Frazelle <jess@docker.com>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user