diff --git a/t/tap-tests-docker/Dockerfile b/t/tap-tests-docker/Dockerfile new file mode 100644 index 0000000..4f2d158 --- /dev/null +++ b/t/tap-tests-docker/Dockerfile @@ -0,0 +1,47 @@ +# DOCKER_NAME=jenkins-tap-test-jessie +FROM docker.mgm.sipwise.com/sipwise-jessie:latest + +# Important! Update this no-op ENV variable when this Dockerfile +# is updated with the current date. It will force refresh of all +# of the base images and things like `apt-get update` won't be using +# old cached versions when the Dockerfile is built. +ENV REFRESHED_AT 2018-01-03 + +RUN echo "# generated by Dockerfile from jenkins-tap-test-jessie at $(date)\n\ +deb https://deb.sipwise.com/autobuild/ internal-jessie main\n" > /etc/apt/sources.list.d/sipwise-internal.list + +RUN apt-get update && apt-get install --assume-yes --no-install-recommends \ + shellcheck pep8 libperl-critic-perl ruby jenkins-debian-glue parallel \ + file binutils xz-utils && \ + apt-get clean + +# The package devscripts has a huge list of dependencies and +# we need checkbashisms scipt only, providing it manually +RUN mkdir /tmp/zzz && cd /tmp/zzz && \ +apt-get download devscripts && \ +ar x devscripts_*.deb && \ +tar -C / -p -xvf data.tar.xz ./usr/bin/checkbashisms && \ +rm -rf /tmp/zzz + +RUN echo 'SHELL=bash WORKSPACE=/code/ /usr/bin/tap_tool_dispatcher' >>/root/.bash_history + +WORKDIR /code/ + +################################################################################ +# Instructions for usage +# ---------------------- +# When you want to build the base image from scratch +# (jump to the next section if you don't want to build yourself!): +# NOTE: run the following command from root folder of git repository: +# +# % docker build --tag="jenkins-tap-test-jessie" -f t/tap-tests-docker/Dockerfile . +# % docker run --rm -i -t -v $(pwd):/code/source:rw jenkins-tap-test-jessie:latest bash +# +# Use the existing docker image: +# % docker pull docker.mgm.sipwise.com/jenkins-tap-test-jessie +# % docker run --rm -i -t -v $(pwd):/code/source:rw docker.mgm.sipwise.com/jenkins-tap-test-jessie:latest bash +# +# Inside docker (the command is in history, just press UP button): +# SHELL=bash WORKSPACE=/code/ /usr/bin/tap_tool_dispatcher +# +################################################################################