From 57e838e4506ab3f989d30ad99007f139ce1c7f3d Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Fri, 6 Sep 2019 09:12:01 +0000 Subject: [PATCH] initial --- .gitlab-ci.yml | 25 +++++++++++++++++++++++++ Dockerfile | 12 ++++++++++++ VERSION | 1 + readme.md | 10 ++++++++++ 4 files changed, 48 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Dockerfile create mode 100644 VERSION create mode 100644 readme.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..5cb5dbe --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,25 @@ +image: docker:stable + +stages: + - build + +variables: + IMAGE_NAME: registry.gitlab.com/wolutator/docker-bash + HUB_IMAGE_NAME: wollud1969/docker-bash-with-ldap-pam + +build: + stage: build + tags: + - hottis + - linux + - docker + script: + - VERSION=`cat VERSION` + - docker build --tag $IMAGE_NAME:latest --tag $IMAGE_NAME:$VERSION --tag $HUB_IMAGE_NAME:$VERSION --tag $HUB_IMAGE_NAME:latest . + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY + - docker push $IMAGE_NAME:latest + - docker push $IMAGE_NAME:$VERSION + - docker login -u $DOCKER_HUB_LOGIN -p $DOCKER_HUB_PASSWORD + - docker push $HUB_IMAGE_NAME:latest + - docker push $HUB_IMAGE_NAME:$VERSION + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9556741 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM docker:stable + +LABEL Maintainer="Wolfgang Hottgenroth " +LABEL ImageName="registry.gitlab.com/wolutator/docker-bash" +LABEL AlternativeImageName="wollud1969/docker-bash" + + +RUN \ + apk add --no-cache bash + +CMD [ "bash" ] + diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..49d5957 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.1 diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..485bdb7 --- /dev/null +++ b/readme.md @@ -0,0 +1,10 @@ +# docker with bash + +This is a Docker image directly derived from the Docker image `docker`, which is required whenever you need the docker tools within a container. + +I use it regularly within Gitlab CI runners. Most recently I was wondering why a specific bash feature (variable indirection) wasn't available in a CI script. The reason was simple: the Docker `docker` image doesn't contain `bash` at all. + +This image now is derived from the Docker `docker` image and just adds the bash. + +I would say: Use it the same way as the original image, you just have the bash now. +