This commit is contained in:
Wolfgang Hottgenroth 2019-09-06 09:12:01 +00:00
commit 57e838e450
4 changed files with 48 additions and 0 deletions

25
.gitlab-ci.yml Normal file
View File

@ -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

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM docker:stable
LABEL Maintainer="Wolfgang Hottgenroth <wolfgang.hottgenroth@icloud.com>"
LABEL ImageName="registry.gitlab.com/wolutator/docker-bash"
LABEL AlternativeImageName="wollud1969/docker-bash"
RUN \
apk add --no-cache bash
CMD [ "bash" ]

1
VERSION Normal file
View File

@ -0,0 +1 @@
0.1

10
readme.md Normal file
View File

@ -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.