Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile configuration #195

Open
wants to merge 32 commits into
base: develop
Choose a base branch
from

Commits on Feb 19, 2024

  1. Use the full identifier for source Docker images

    This helps ensure that when a Docker image is built the expacted source
    image is used regardless of what repository is configured as the
    default on the host system. It also makes our Dockerfiles more
    seamlessly convertible to using the GitHub Container Registry or any
    other Open Container Initiative (OCI) compatible registry.
    mcdonnnj committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    a1b9e94 View commit details
    Browse the repository at this point in the history
  2. Use a specific version of Alpine Linux

    Use the full tag that includes the Alpine Linux version to ensure the
    pulled image is always the same.
    mcdonnnj committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    bac905d View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2024

  1. Merge pull request #187 from cisagov/improvement/use_full_image_source

    Use the full path for source container images
    mcdonnnj authored Feb 20, 2024
    Configuration menu
    Copy the full SHA
    ce1247a View commit details
    Browse the repository at this point in the history
  2. Install cisagov/skeleton-python-library directly

    Instead of downloading the source archive, extracting it, and then
    installing it with pip we instead just let pip directly install the
    package.
    mcdonnnj committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    5088fdc View commit details
    Browse the repository at this point in the history
  3. Remove unused OS package dependencies

    Since we are now installing cisagov/skeleton-python-library directly
    with pip we no longer need these OS packages.
    mcdonnnj committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    22aa084 View commit details
    Browse the repository at this point in the history
  4. Change the secret message being checks in tests

    Now that we are not overwriting the internal Python package file the
    text we look for must match what is output by default. The Docker
    Compose secret configuration is left in place to continue to serve as
    an example and to be leveraged for a future update to
    cisagov/skeleton-python-library that can provide similar functionality
    to what was removed in this project.
    mcdonnnj committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    66032ea View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. Merge pull request #188 from cisagov/improvement/install_skeleton-pyt…

    …hon-library_directly
    
    Install cisagov/skeleton-python-library directly with `pip`
    mcdonnnj authored Feb 21, 2024
    Configuration menu
    Copy the full SHA
    aa39972 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2024

  1. Remove package upgrading

    We should not blindly upgrade all pre-installed packages. This can
    create inconsistent build results due to changes in installed versions.
    mcdonnnj committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    6b36d69 View commit details
    Browse the repository at this point in the history
  2. Pin Python packages directly installed

    Pin the versions of the pip, setuptools, and wheel packages that are
    installed.
    mcdonnnj committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    45f104a View commit details
    Browse the repository at this point in the history
  3. Move WORKDIR instruction

    We can move this instruction to the end of the Dockerfile now that we
    are no longer working with files in the Docker container when building.
    mcdonnnj committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    446c9b5 View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2024

  1. Merge pull request #189 from cisagov/improvement/make_builds_more_rep…

    …eatable
    
    Pin Python package versions and improve build repeatability
    mcdonnnj authored Feb 26, 2024
    Configuration menu
    Copy the full SHA
    0a49b3e View commit details
    Browse the repository at this point in the history
  2. Prefer calling pip as a module

    Instead of relying on `pip3` being on the PATH we instead call the
    module through the Python executable. This ensures that the `pip` being
    used is in the same environment as the `python3` being used.
    mcdonnnj committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    8534e1d View commit details
    Browse the repository at this point in the history
  3. Use a Python virtual environment in the Docker image

    Using a virtual environment is a Python best practice. We also
    consolidate all of the Python dependency installation steps into a
    single RUN instruction. This ensures that Python setup is cached in one
    layer and mirrors the logical organization of this being a single step.
    mcdonnnj committed Feb 26, 2024
    Configuration menu
    Copy the full SHA
    8113726 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2024

  1. Explain ln options being used

    Since we cannot use long options on Alpine Linux we should explain what
    the short options we are using do. I also changed the order of options
    so that they are in alphabetical order.
    
    Co-authored-by: Shane Frasier <[email protected]>
    mcdonnnj and jsf9k committed Feb 27, 2024
    Configuration menu
    Copy the full SHA
    77b5e34 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #190 from cisagov/improvement/use_Python_venv

    Use a Python virtual environment
    mcdonnnj authored Feb 27, 2024
    Configuration menu
    Copy the full SHA
    35e8753 View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2024

  1. Add a pipenv configuration

    This configuration includes a Pipfile configuration file and the
    generated Pipfile.lock file that pins to specific versions for the
    Python dependencies for this project. This will help us ensure
    repeatable builds. The pipenv package is added as a developmental
    requirement to support these files.
    mcdonnnj committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    2266949 View commit details
    Browse the repository at this point in the history
  2. Install Python dependencies using pipenv

    Now that we have a pipenv configuration we will use it to install the
    Python dependencies for the image. The `build` workflow is updated to
    no longer pass the VERSION build argument in line with this change.
    mcdonnnj committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    d530d07 View commit details
    Browse the repository at this point in the history
  3. Use a multi-stage Docker build

    Switch to using a multi-stage build in the Dockerfile. This reduces
    image size since pipenv and its dependencices are not needed in the
    final image. It also ensures that the system Python environment is
    unmodified.
    mcdonnnj committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    adfcfdb View commit details
    Browse the repository at this point in the history
  4. Install core Python packages into the system Python environment

    Install the core Python packages (pip, setuptools, and wheel) into the
    system Python environment before installing pipenv. This keeps things
    consistent with our usual approach to Python environments.
    mcdonnnj committed Feb 28, 2024
    Configuration menu
    Copy the full SHA
    8e03ad9 View commit details
    Browse the repository at this point in the history
  5. Fix outdated comment in the Dockerfile

    The comment references a command that is no longer being run.
    
    Co-authored-by: Shane Frasier <[email protected]>
    mcdonnnj and jsf9k authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    c45345f View commit details
    Browse the repository at this point in the history
  6. Fix typo in Dockerfile comment

    Co-authored-by: dav3r <[email protected]>
    mcdonnnj and dav3r authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    d42ae8f View commit details
    Browse the repository at this point in the history
  7. Merge pull request #191 from cisagov/improvement/pin_Python_configura…

    …tion
    
    Install Python dependencies with `pipenv`
    mcdonnnj authored Feb 28, 2024
    Configuration menu
    Copy the full SHA
    1b3e9d8 View commit details
    Browse the repository at this point in the history

Commits on Feb 29, 2024

  1. Update image tag information in the README

    Change the tags used in the table to match the version of the project.
    Previously "1.2.3" was used as an example version but there is no
    reason not to use the real version of the image.
    mcdonnnj committed Feb 29, 2024
    Configuration menu
    Copy the full SHA
    2811690 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a601fe View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2024

  1. Merge pull request #192 from cisagov/improvement/update_readme

    Update the README
    mcdonnnj authored Mar 4, 2024
    Configuration menu
    Copy the full SHA
    6d487cf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d7cc8f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b28481f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fff262b View commit details
    Browse the repository at this point in the history
  5. Bump cisagov/skeleton-python-library from 0.0.1 to 0.2.0

    Update the Dockerfile and testing to accommodate changes in the new
    version.
    mcdonnnj committed Mar 4, 2024
    Configuration menu
    Copy the full SHA
    dd7d982 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2024

  1. Configuration menu
    Copy the full SHA
    e054517 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d2c1ba2 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2024

  1. Correct usage of the term "symlink"

    Co-authored-by: dav3r <[email protected]>
    mcdonnnj and dav3r authored Mar 13, 2024
    Configuration menu
    Copy the full SHA
    ae46c28 View commit details
    Browse the repository at this point in the history