Skip to content

Commit

Permalink
Merge pull request #8 from cytopia/release-0.12
Browse files Browse the repository at this point in the history
Release v0.12
  • Loading branch information
cytopia authored Apr 27, 2018
2 parents 1c1b3c7 + 6ef9715 commit 6494137
Show file tree
Hide file tree
Showing 10 changed files with 953 additions and 596 deletions.
31 changes: 12 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
###
### BIND
###
FROM debian:stable
FROM debian:buster-slim
MAINTAINER "cytopia" <[email protected]>


###
### Labels
###
LABEL \
name="cytopia's Bind Image" \
image="bind" \
vendor="cytopia" \
license="MIT" \
build-date="2018-01-11"


###
### Install
###
RUN apt-get update && apt-get -y install \
bind9 \
&& rm -r /var/lib/apt/lists/*
RUN set -x \
&& apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
bind9 \
dnsutils \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps \
&& rm -r /var/lib/apt/lists/* \
&& mkdir /var/log/named \
&& chown bind:bind /var/log/named \
&& chmod 0755 /var/log/named


###
### Bootstrap Scipts
###
COPY ./scripts/docker-entrypoint.sh /
COPY ./data/docker-entrypoint.sh /


###
Expand Down
362 changes: 318 additions & 44 deletions README.md

Large diffs are not rendered by default.

56 changes: 0 additions & 56 deletions build/docker-attach.sh

This file was deleted.

30 changes: 1 addition & 29 deletions build/docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,37 +32,9 @@ if [ ! -f "${CWD}/Dockerfile" ]; then
exit 1
fi

# Get docker Name
if ! grep -q 'image=".*"' "${CWD}/Dockerfile" > /dev/null 2>&1; then
echo "No 'image' LABEL found"
exit
fi
NAME="$( grep 'image=".*"' "${CWD}/Dockerfile" | sed 's/^[[:space:]]*//g' | awk -F'"' '{print $2}' )"
DATE="$( date '+%Y-%m-%d' )"


###
### Build
###

# Build Docker
run "docker build -t cytopia/${NAME} ${CWD}"

# Update build date
run "sed -i'' 's/<small>\*\*Latest\sbuild.*/<small>**Latest build:** ${DATE}<\/small>/g' ${CWD}/README.md"
run "sed -i'' 's/build-date=\".*\"/build-date=\"${DATE}\"/g' ${CWD}/Dockerfile"


###
### Test
###

docker run -d --rm --name my_tmp_${NAME} -t cytopia/${NAME}
BIND_VERSION="$( docker exec my_tmp_${NAME} named -V | grep -oiE '^BIND[[:space:]]+[0-9.]+' )"
docker stop "$(docker ps | grep "my_tmp_${NAME}" | awk '{print $1}')"

echo "${BIND_VERSION}"

sed -i'' '/##[[:space:]]Version/q' "${CWD}/README.md"
echo "" >> "${CWD}/README.md"
echo "${BIND_VERSION}" >> "${CWD}/README.md"
run "docker build -t cytopia/bind ${CWD}"
46 changes: 0 additions & 46 deletions build/docker-enter.sh

This file was deleted.

75 changes: 0 additions & 75 deletions build/docker-push.sh

This file was deleted.

30 changes: 1 addition & 29 deletions build/docker-rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,37 +32,9 @@ if [ ! -f "${CWD}/Dockerfile" ]; then
exit 1
fi

# Get docker Name
if ! grep -q 'image=".*"' "${CWD}/Dockerfile" > /dev/null 2>&1; then
echo "No 'image' LABEL found"
exit
fi
NAME="$( grep 'image=".*"' "${CWD}/Dockerfile" | sed 's/^[[:space:]]*//g' | awk -F'"' '{print $2}' )"
DATE="$( date '+%Y-%m-%d' )"


###
### Build
###

# Build Docker
run "docker build --no-cache -t cytopia/${NAME} ${CWD}"

# Update build date
run "sed -i'' 's/<small>\*\*Latest\sbuild.*/<small>**Latest build:** ${DATE}<\/small>/g' ${CWD}/README.md"
run "sed -i'' 's/build-date=\".*\"/build-date=\"${DATE}\"/g' ${CWD}/Dockerfile"


###
### Test
###

docker run -d --rm --name my_tmp_${NAME} -t cytopia/${NAME}
BIND_VERSION="$( docker exec my_tmp_${NAME} named -V | grep -oiE '^BIND[[:space:]]+[0-9.]+' )"
docker stop "$(docker ps | grep "my_tmp_${NAME}" | awk '{print $1}')"

echo "${BIND_VERSION}"

sed -i'' '/##[[:space:]]Version/q' "${CWD}/README.md"
echo "" >> "${CWD}/README.md"
echo "${BIND_VERSION}" >> "${CWD}/README.md"
run "docker build --no-cache -t cytopia/bind ${CWD}"
49 changes: 0 additions & 49 deletions build/docker-start.sh

This file was deleted.

Loading

0 comments on commit 6494137

Please sign in to comment.