diff --git a/Dockerfile b/Dockerfile index 6a00b36..c40e756 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Official Docker images are in the form library/ while non-official # images are in the form /. -FROM docker.io/library/python:3.12.0-alpine3.18 as compile-stage +FROM docker.io/library/python:3.12.2-alpine3.19 as compile-stage ### # Unprivileged user variables @@ -12,7 +12,7 @@ ENV VIRTUAL_ENV="${CISA_HOME}/.venv" # Versions of the Python packages installed directly ENV PYTHON_PIP_VERSION=24.0 ENV PYTHON_PIPENV_VERSION=2023.12.1 -ENV PYTHON_SETUPTOOLS_VERSION=69.1.0 +ENV PYTHON_SETUPTOOLS_VERSION=69.1.1 ENV PYTHON_WHEEL_VERSION=0.42.0 ### @@ -53,7 +53,7 @@ RUN pipenv check --verbose \ # Official Docker images are in the form library/ while non-official # images are in the form /. -FROM docker.io/library/python:3.12.0-alpine3.18 as build-stage +FROM docker.io/library/python:3.12.2-alpine3.19 as build-stage ### # For a list of pre-defined annotation keys and value types see: @@ -108,4 +108,4 @@ USER ${CISA_USER}:${CISA_GROUP} EXPOSE 8080/TCP VOLUME ["/var/log"] ENTRYPOINT ["example"] -CMD ["--log-level", "DEBUG"] +CMD ["--log-level", "DEBUG", "8", "2"] diff --git a/README.md b/README.md index a74bba4..306552f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ appropriate for Docker containers and the major languages that we use. To run the `cisagov/example` image via Docker: ```console -docker run cisagov/example:0.0.1 +docker run cisagov/example:0.2.0 ``` ### Running with Docker Compose ### @@ -37,7 +37,7 @@ docker run cisagov/example:0.0.1 services: example: - image: cisagov/example:0.0.1 + image: cisagov/example:0.2.0 volumes: - type: bind source: @@ -82,7 +82,7 @@ environment variables. See the services: example: - image: cisagov/example:0.0.1 + image: cisagov/example:0.2.0 volumes: - type: bind source: @@ -125,7 +125,7 @@ environment variables. See the 1. Pull the new image: ```console - docker pull cisagov/example:0.0.1 + docker pull cisagov/example:0.2.0 ``` 1. Recreate and run the container by following the [previous instructions](#running-with-docker). @@ -164,12 +164,12 @@ and then update dependencies as you would above. The images of this container are tagged with [semantic versions](https://semver.org) of the underlying example project that they containerize. It is recommended that most users use a version tag (e.g. -`:0.0.1`). +`:0.2.0`). | Image:tag | Description | |-----------|-------------| -|`cisagov/example:0.0.1`| An exact release version. | -|`cisagov/example:0.0`| The most recent release matching the major and minor version numbers. | +|`cisagov/example:0.2.0`| An exact release version. | +|`cisagov/example:0.2`| The most recent release matching the major and minor version numbers. | |`cisagov/example:0`| The most recent release matching the major version number. | |`cisagov/example:edge` | The most recent image built from a merge into the `develop` branch of this repository. | |`cisagov/example:nightly` | A nightly build of the `develop` branch of this repository. | @@ -225,7 +225,7 @@ Build the image locally using this git repository as the [build context](https:/ ```console docker build \ - --tag cisagov/example:0.0.1 \ + --tag cisagov/example:0.2.0 \ https://github.com/cisagov/example.git#develop ``` @@ -256,7 +256,7 @@ Docker: --file Dockerfile-x \ --platform linux/amd64 \ --output type=docker \ - --tag cisagov/example:0.0.1 . + --tag cisagov/example:0.2.0 . ``` ## New repositories from a skeleton ## diff --git a/src/Pipfile b/src/Pipfile index 56f2fc9..6480562 100644 --- a/src/Pipfile +++ b/src/Pipfile @@ -6,8 +6,8 @@ name = "pypi" # List any Python dependencies for the image here [packages] # This should match the version of the image -example = {file = "https://github.com/cisagov/skeleton-python-library/archive/v0.0.1.tar.gz"} +example = {file = "https://github.com/cisagov/skeleton-python-library/archive/v0.2.0.tar.gz"} # This version should match the version of Python in the image [requires] -python_full_version = "3.12.0" +python_full_version = "3.12.2" diff --git a/src/Pipfile.lock b/src/Pipfile.lock index d39d053..6afbec3 100644 --- a/src/Pipfile.lock +++ b/src/Pipfile.lock @@ -1,11 +1,11 @@ { "_meta": { "hash": { - "sha256": "654452851fea1eb2c8811649e5efe8873c8ff51f5c14dd27a4a8ebb5b15a27c4" + "sha256": "ad65a437d348bca066601e0d05a14c0ee23e38b59d8d8e71558cb17c57259f6b" }, "pipfile-spec": 6, "requires": { - "python_full_version": "3.12.0" + "python_full_version": "3.12.2" }, "sources": [ { @@ -16,6 +16,14 @@ ] }, "default": { + "contextlib2": { + "hashes": [ + "sha256:3fbdb64466afd23abaf6c977627b75b6139a5a3e8ce38405c5b413aed7a0471f", + "sha256:ab1e2bfe1d01d968e1b7e8d9023bc51ef3509bba217bb730cee3827e1ee82869" + ], + "markers": "python_version >= '3.6'", + "version": "==21.6.0" + }, "docopt": { "hashes": [ "sha256:49b3a825280bd66b3aa83585ef59c4a8c82f2c8a522dbe754a8bc8d08c85c491" @@ -23,7 +31,14 @@ "version": "==0.6.2" }, "example": { - "file": "https://github.com/cisagov/skeleton-python-library/archive/v0.0.1.tar.gz" + "file": "https://github.com/cisagov/skeleton-python-library/archive/v0.2.0.tar.gz" + }, + "schema": { + "hashes": [ + "sha256:f06717112c61895cabc4707752b88716e8420a8819d71404501e114f91043197", + "sha256:f3ffdeeada09ec34bf40d7d79996d9f7175db93b7a5065de0faa7f41083c1e6c" + ], + "version": "==0.7.5" }, "setuptools": { "hashes": [ diff --git a/src/version.txt b/src/version.txt index f102a9c..d3ec452 100644 --- a/src/version.txt +++ b/src/version.txt @@ -1 +1 @@ -__version__ = "0.0.1" +__version__ = "0.2.0" diff --git a/tests/container_test.py b/tests/container_test.py index 60402a4..be6171f 100644 --- a/tests/container_test.py +++ b/tests/container_test.py @@ -11,6 +11,7 @@ ENV_VAR = "ECHO_MESSAGE" ENV_VAR_VAL = "Hello World from docker compose!" READY_MESSAGE = "This is a debug message" +DIVISION_MESSAGE = "8 / 2 == 4.000000" SECRET_QUOTE = "Three may keep a secret, if two of them are dead." # nosec RELEASE_TAG = os.getenv("RELEASE_TAG") VERSION_FILE = "src/version.txt" @@ -53,6 +54,7 @@ def test_output(dockerc, main_container): # make sure container exited if running test isolated dockerc.wait(main_container.id) log_output = main_container.logs() + assert DIVISION_MESSAGE in log_output, "Division message not found in log output." assert SECRET_QUOTE in log_output, "Secret not found in log output."