Skip to content

Commit

Permalink
Update dev image deps and descriptions, remove Docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Oct 25, 2024
1 parent e4eb207 commit 06417fe
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 13 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Semantically versioned images get tagged with their major and minor versions as well as the full version number

### Changed

- Updated `black`, `flake8`, `prettier`, `stylelint`, `stylelint-config-standard-scss` and `stylelint-selector-bem-pattern` in the dev image

### Deprecated
### Removed

- The dev image no longer contains `docker`

### Fixed

- Fixed the `rg.opencontainers.image.description` in the Django image

### Security

## [0.3.0](https://github.com/nationalarchives/docker/compare/v0.2.11...v0.3.0) - 2024-10-18
Expand Down
37 changes: 26 additions & 11 deletions docker/tna-python-dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,39 @@ ARG BASE_IMAGE_TAG=latest

FROM "$BASE_IMAGE":"$BASE_IMAGE_TAG"

# ==========================================
# Ensure the `/bin/sh -c` interpreter Docker
# executes commands through doesn't just use
# the final operation in a pipe to determine
# the success of the entire command
# https://github.com/hadolint/hadolint/wiki/DL4006
# ==========================================
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

RUN apt-get update; \
apt-get install -y --no-install-recommends ca-certificates curl gnupg; \
install -m 0755 -d /etc/apt/keyrings; \
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg; \
chmod a+r /etc/apt/keyrings/docker.gpg; \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null; \
apt-get update; \
apt-get install -y --no-install-recommends docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin; \
apt-get clean; \
apt-get autoremove -y --purge; \
rm -rfv /var/lib/apt/lists/*
# RUN apt-get update; \
# apt-get install -y --no-install-recommends ca-certificates curl gnupg; \
# install -m 0755 -d /etc/apt/keyrings; \
# curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg; \
# chmod a+r /etc/apt/keyrings/docker.gpg; \
# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null; \
# apt-get update; \
# apt-get install -y --no-install-recommends docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin; \
# apt-get clean; \
# apt-get autoremove -y --purge; \
# rm -rfv /var/lib/apt/lists/*

# ==========================================
# Copy the development scripts into the user
# .local/bin/dev/ directory
# ==========================================
COPY --chown=app bin /home/app/.local/bin/dev
RUN chmod +x -fR /home/app/.local/bin/dev
ENV PATH="/home/app/.local/bin/dev:$PATH"

# ==========================================
# Copy any configuration files into the main
# app directory
# ==========================================
COPY --chown=app lib/* /home/app/

CMD ["dev"]
4 changes: 2 additions & 2 deletions docker/tna-python-dev/bin/dev
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

poetry install --no-root --with dev || true
python -m pip install --quiet black==24.2.0 flake8==7.0.0 isort==5.13.2
python -m pip install --quiet black==24.10.0 flake8==7.1.0 isort==5.13.2

cd /app || return

Expand All @@ -12,6 +12,6 @@ then
else
nvm use lts/iron
fi
npm install -g prettier@3.2.5 [email protected] stylelint@16.2.1 stylelint-config-standard-scss@13.0.0 stylelint-selector-bem-pattern@3.0.1
npm install -g prettier@3.3.3 [email protected] stylelint@16.10.0 stylelint-config-standard-scss@13.1.0 stylelint-selector-bem-pattern@4.0.1

welcome
9 changes: 9 additions & 0 deletions docker/tna-python-django/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ ARG BASE_IMAGE_TAG=latest

FROM "$BASE_IMAGE":"$BASE_IMAGE_TAG"

# ==========================================
# Add some opencontainer labels which GitHub
# uses to display additional information
# ==========================================
ARG TNA_DOCKER_IMAGE_SOURCE
LABEL org.opencontainers.image.description="National Archives base Docker image" \
org.opencontainers.image.source="$TNA_DOCKER_IMAGE_SOURCE" \
org.opencontainers.image.licenses=MIT

# ==========================================
# Move the existing build and run scripts to
# a -common suffix so that we can keep using
Expand Down

0 comments on commit 06417fe

Please sign in to comment.