Skip to content

Commit

Permalink
Merge pull request #97 from cisagov/improvement/update_domain-scan_in…
Browse files Browse the repository at this point in the history
…stallation_and_pull_in_latest_changes

Update `cisagov/domain-scan` installation method and pull in latest changes
  • Loading branch information
jsf9k authored Feb 8, 2023
2 parents e6993ac + a13052b commit 998936b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ###
Expand All @@ -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: <your_output_dir>
Expand Down Expand Up @@ -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: <your_output_dir>
Expand Down Expand Up @@ -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).
Expand All @@ -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. |
Expand Down Expand Up @@ -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
```

Expand Down Expand Up @@ -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 ##
Expand Down
2 changes: 1 addition & 1 deletion src/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.5.11"
__version__ = "1.5.12"

0 comments on commit 998936b

Please sign in to comment.