diff --git a/Dockerfile b/Dockerfile index 54e3cd0..b127644 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ RUN apt-get update --quiet --quiet \ # Create unprivileged user ### RUN groupadd --system --gid ${CISA_GID} ${CISA_GROUP} \ - && useradd --system --uid ${CISA_UID} --gid ${CISA_GROUP} --comment "${CISA_USER} user" ${CISA_USER} + && useradd --system --uid ${CISA_UID} --gid ${CISA_GROUP} --comment "${CISA_USER} user" --create-home ${CISA_USER} ### # Install everything we need @@ -44,7 +44,7 @@ ENV DEPS \ redis-tools \ wget ENV INSTALL_DEPS \ - git + curl RUN apt-get install --quiet --quiet --yes \ --no-install-recommends --no-install-suggests \ $DEPS $INSTALL_DEPS @@ -60,9 +60,15 @@ RUN pip install --no-cache-dir --upgrade pip setuptools ### # Install domain-scan -### -RUN git clone https://github.com/cisagov/domain-scan \ - ${CISA_HOME}/domain-scan/ +# +# The SHELL command is used to ensure that if either the curl call or +# the tar call fail then the image build fails. Source: +# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#using-pipes +### +SHELL ["/bin/bash", "-o", "pipefail", "-c"] +RUN mkdir ${CISA_HOME}/domain-scan \ + && curl --location https://github.com/cisagov/domain-scan/tarball/master \ + | tar --extract --gzip --strip-components 1 --directory ${CISA_HOME}/domain-scan/ RUN pip install --no-cache-dir --upgrade \ --requirement ${CISA_HOME}/domain-scan/requirements.txt diff --git a/README.md b/README.md index 017fcb7..14f2309 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ expects the secrets in a different location. To run the `cisagov/gatherer` image via Docker: ```console -docker run cisagov/gatherer:1.5.11 +docker run cisagov/gatherer:1.5.12 ``` ### Running with Docker Compose ### @@ -47,7 +47,7 @@ docker run cisagov/gatherer:1.5.11 services: gatherer: - image: cisagov/gatherer:1.5.11 + image: cisagov/gatherer:1.5.12 volumes: - type: bind source: @@ -93,7 +93,7 @@ environment variables. See the services: gatherer: - image: cisagov/gatherer:1.5.11 + image: cisagov/gatherer:1.5.12 volumes: - type: bind source: @@ -130,7 +130,7 @@ environment variables. See the 1. Pull the new image: ```console - docker pull cisagov/gatherer:1.5.11 + docker pull cisagov/gatherer:1.5.12 ``` 1. Recreate and run the container by following the [previous instructions](#running-with-docker). @@ -140,11 +140,11 @@ environment variables. See the The images of this container are tagged with [semantic versions](https://semver.org) of the underlying gatherer project that they containerize. It is recommended that most users use a version tag (e.g. -`:1.5.11`). +`:1.5.12`). | Image:tag | Description | |-----------|-------------| -|`cisagov/gatherer:1.5.11`| An exact release version. | +|`cisagov/gatherer:1.5.12`| An exact release version. | |`cisagov/gatherer:1.5`| The most recent release matching the major and minor version numbers. | |`cisagov/gatherer:1`| The most recent release matching the major version number. | |`cisagov/gatherer:edge` | The most recent image built from a merge into the `develop` branch of this repository. | @@ -207,8 +207,8 @@ Build the image locally using this git repository as the [build context](https:/ ```console docker build \ - --build-arg VERSION=1.5.11 \ - --tag cisagov/gatherer:1.5.11 \ + --build-arg VERSION=1.5.12 \ + --tag cisagov/gatherer:1.5.12 \ https://github.com/cisagov/gatherer.git#develop ``` @@ -238,9 +238,9 @@ Docker: docker buildx build \ --file Dockerfile-x \ --platform linux/amd64 \ - --build-arg VERSION=1.5.11 \ + --build-arg VERSION=1.5.12 \ --output type=docker \ - --tag cisagov/gatherer:1.5.11 . + --tag cisagov/gatherer:1.5.12 . ``` ## Contributing ## diff --git a/src/version.txt b/src/version.txt index 9e78465..da34e60 100644 --- a/src/version.txt +++ b/src/version.txt @@ -1 +1 @@ -__version__ = "1.5.11" +__version__ = "1.5.12"