Skip to content

Commit

Permalink
Correct Docker container references
Browse files Browse the repository at this point in the history
Refer to images as "Docker container images", not "Docker
containers" or just "containers".

Attempting to apply some consistency.

refs GH-508
  • Loading branch information
atc0005 committed Feb 3, 2022
1 parent 1148d35 commit 2971c25
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 47 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ updates:
time: "02:00"
timezone: "America/Chicago"

# Ignore updates from series associated with "stable" container and no
# longer supported Go versions.
# Ignore updates from series associated with "stable" container image and
# no longer supported Go versions.
ignore:
- dependency-name: "golang"
versions:
# Greater than or equal to stable container series
# Greater than or equal to stable container image series
- ">= 1.17"

# Less than oldstable series
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint-docker-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ jobs:
hadolint stable/build/alpine-x64/Dockerfile
hadolint stable/build/alpine-x86/Dockerfile
hadolint stable/build/debian/Dockerfile
hadolint stable/build/mirror/Dockerfile
hadolint oldstable/Dockerfile
hadolint unstable/Dockerfile
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ linting:
done

.PHONY: build
## build: build all Docker images
## build: build all Docker container images
build:
@echo "Building Docker containers"
@echo "Building Docker container images"

@echo "Bundle linter config files to provide baseline default settings"
@for version in {oldstable,unstable}; do cp -vf .markdownlint.yml $$version/; done
@for version in {stable/linting,stable/combined,stable/build/alpine-x64,stable/build/alpine-x86,stable/build/debian}; do cp -vf .markdownlint.yml $$version/; done

# unstable container has its own copy of this file
# unstable container image has its own copy of this file
@cp -vf .golangci.yml oldstable/
@for version in {stable/linting,stable/combined,stable/build/alpine-x64,stable/build/alpine-x86,stable/build/debian}; do cp -vf .golangci.yml $$version/; done

Expand Down Expand Up @@ -225,10 +225,10 @@ build:
@echo "Remove temporary copies of bundled files"
@rm -vf {stable,oldstable,unstable}/.markdownlint.yml

# unstable container has its own copy of this file
# unstable container image has its own copy of this file
@rm -vf {stable,oldstable}/.golangci.yml

@echo "Finished building containers"
@echo "Finished building Docker container images"

@sudo docker image ls --filter "label=$(DOCKER_IMAGE_OWNER_LABEL)"

Expand All @@ -250,7 +250,7 @@ upload:
# $(error GitHub token file does not exist!)
# endif

@echo "Uploading container images to $(DOCKER_IMAGE_REGISTRY) ..."
@echo "Uploading Docker container images to $(DOCKER_IMAGE_REGISTRY) ..."
@cat $(DOCKER_IMAGE_REGISTRY_TOKEN_FILE) | sudo docker login $(DOCKER_IMAGE_REGISTRY) --username atc0005 --password-stdin

@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_ALPINE_BUILDX86)
Expand All @@ -274,10 +274,10 @@ upload:
@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE)
@sudo docker push $(DOCKER_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE)-$(REPO_VERSION)

@echo "Completed container uploads to $(DOCKER_IMAGE_REGISTRY)"
@echo "Completed Docker container image uploads to $(DOCKER_IMAGE_REGISTRY)"


@echo "Uploading container images to $(GITHUB_IMAGE_REGISTRY) ..."
@echo "Uploading Docker container images to $(GITHUB_IMAGE_REGISTRY) ..."
@cat $(GITHUB_IMAGE_REGISTRY_TOKEN_FILE) | sudo docker login $(GITHUB_IMAGE_REGISTRY) --username atc0005 --password-stdin

@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_ALPINE_BUILDX86)
Expand All @@ -300,4 +300,4 @@ upload:
@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE)
@sudo docker push $(GITHUB_IMAGE_REGISTRY)/$(DOCKER_IMAGE_REGISTRY_USER)/$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_NAME_STABLE)-$(REPO_VERSION)

@echo "Completed container uploads to $(GITHUB_IMAGE_REGISTRY)"
@echo "Completed Docker container image uploads to $(GITHUB_IMAGE_REGISTRY)"
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ See [our GitHub repo](https://github.com/atc0005/go-ci) for the latest
content, to file an issue or submit improvements for review and potential
inclusion into the project.

See these container registries for the full listing of available container
images:
See these container image registries for the full listing of available images:

- [GitHub repo](https://github.com/atc0005/go-ci/pkgs/container/go-ci)
- [Docker Hub repo](https://hub.docker.com/r/atc0005/go-ci)

## Overview

A mix of GitHub Actions / CI focused Docker containers primarily intended to
simplify linting/testing/building other Go projects that I maintain. I am
developing the content in the open in case it is useful to others.
A mix of GitHub Actions / CI focused Docker container images primarily
intended to simplify linting/testing/building other Go projects that I
maintain. I am developing the content in the open in case it is useful to
others.

## Linting tools included

Expand All @@ -58,8 +58,7 @@ developing the content in the open in case it is useful to others.

## Docker images

See these container registries for the full listing of available container
images:
See these container image registries for the full listing of available images:

- [GitHub repo](https://github.com/atc0005/go-ci/pkgs/container/go-ci)
- [Docker Hub repo](https://hub.docker.com/r/atc0005/go-ci)
Expand Down Expand Up @@ -132,7 +131,7 @@ images:
- provides multiple linters
- see [Linting tools included](#linting-tools-included)
- used to test new or additional `golangci-lint` linters prior to inclusion in
the `stable` and `oldstable` container variants
the `stable` and `oldstable` container image variants
- new linters as a whole may be added to multiple image variants, not just
this image unless it is suspected that the new linters are highly
experimental/unstable
Expand All @@ -141,7 +140,7 @@ images:

- smaller image
- uses `golangci/golangci-lint:vX.Y.Z-alpine` image as base
- created as part of a multi-stage container build
- created as part of a multi-stage container image build
- intended for lightweight testing of iterative branch changes
- e.g., testing or squash/rebase branch work prior to a full suite of checks
usually associated with Pull Requests
Expand Down
8 changes: 4 additions & 4 deletions oldstable/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LABEL org.opencontainers.image.source="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.documentation="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.url="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.title="go-ci-oldstable"
LABEL org.opencontainers.image.description="Docker container used to lint, build and test Go code. \
LABEL org.opencontainers.image.description="Docker container image used to lint, build and test Go code. \
Based on the latest version of the current outgoing stable golang image."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

Expand Down Expand Up @@ -48,9 +48,9 @@ RUN apt-get update \
&& go install github.com/fatih/errwrap@${ERRWRAP_VERSION} \
&& go clean -cache -modcache

# Copy over linting config files to root of container to serve as a default.
# Projects bringing their own config files (e.g., via GitHub Actions) can
# easily override these files, while projects choosing to use these config
# Copy over linting config files to root of container image to serve as a
# default. Projects bringing their own config files (e.g., via GitHub Actions)
# can easily override these files, while projects choosing to use these config
# files exclusively can omit their copy.
#
# These files are copied from the root of this repo alongside this Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion stable/build/alpine-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LABEL org.opencontainers.image.source="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.documentation="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.url="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.title="go-ci-stable-alpine-buildx64"
LABEL org.opencontainers.image.description="Docker container used to build Go code. \
LABEL org.opencontainers.image.description="Docker container image used to build Go code. \
Based on the latest version of the current (x64) stable golang alpine \
image. Supports cross-platform, static cgo-enabled builds for Windows and \
Linux."
Expand Down
2 changes: 1 addition & 1 deletion stable/build/alpine-x86/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LABEL org.opencontainers.image.source="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.documentation="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.url="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.title="go-ci-stable-alpine-buildx86"
LABEL org.opencontainers.image.description="Docker container used to build Go code. \
LABEL org.opencontainers.image.description="Docker container image used to build Go code. \
Based on the latest version of the current stable i386/golang alpine image. Supports \
cross-platform, static cgo-enabled builds for Windows and Linux."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"
Expand Down
2 changes: 1 addition & 1 deletion stable/build/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LABEL org.opencontainers.image.source="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.documentation="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.url="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.title="go-ci-stable-debian-build"
LABEL org.opencontainers.image.description="Docker container used to lint, build and test Go code. \
LABEL org.opencontainers.image.description="Docker container image used to lint, build and test Go code. \
Based on the latest version of the current stable golang image. Supports static, \
cgo-enabled builds via mingw."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"
Expand Down
8 changes: 4 additions & 4 deletions stable/combined/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LABEL org.opencontainers.image.source="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.documentation="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.url="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.title="go-ci-stable"
LABEL org.opencontainers.image.description="Docker container used to lint, build and test Go code. \
LABEL org.opencontainers.image.description="Docker container image used to lint, build and test Go code. \
Based on the latest version of the current stable golang image."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"

Expand Down Expand Up @@ -48,9 +48,9 @@ RUN apt-get update \
&& go install github.com/fatih/errwrap@${ERRWRAP_VERSION} \
&& go clean -cache -modcache

# Copy over linting config files to root of container to serve as a default.
# Projects bringing their own config files (e.g., via GitHub Actions) can
# easily override these files, while projects choosing to use these config
# Copy over linting config files to root of container image to serve as a
# default. Projects bringing their own config files (e.g., via GitHub Actions)
# can easily override these files, while projects choosing to use these config
# files exclusively can omit their copy.
#
# These files are copied from the root of this repo alongside this Dockerfile
Expand Down
8 changes: 4 additions & 4 deletions stable/linting/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LABEL org.opencontainers.image.source="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.documentation="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.url="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.title="go-ci-lint-only"
LABEL org.opencontainers.image.description="Docker container intended for lightweight \
LABEL org.opencontainers.image.description="Docker image intended for lightweight \
linting and testing of Go code. Based on current golangci-lint \
image. Intended for lightweight testing of iterative branch changes."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"
Expand All @@ -42,9 +42,9 @@ ENV STATICCHECK_VERSION="v0.2.2"

COPY --from=builder /go/bin/staticcheck /usr/bin/staticcheck

# Copy over linting config files to root of container to serve as a default.
# Projects bringing their own config files (e.g., via GitHub Actions) can
# easily override these files, while projects choosing to use these config
# Copy over linting config files to root of container image to serve as a
# default. Projects bringing their own config files (e.g., via GitHub Actions)
# can easily override these files, while projects choosing to use these config
# files exclusively can omit their copy.
#
# These files are copied from the root of this repo alongside this Dockerfile
Expand Down
12 changes: 6 additions & 6 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@ module github.com/atc0005/go-ci/tools
go 1.15

require (
// golangci-lint - intended as a primary linter
github.com/golangci/golangci-lint v1.44.0

// staticcheck - intended as a primary linter
honnef.co/go/tools v0.2.2

// errwrap - provided as an optional linter
github.com/fatih/errwrap v1.3.1

// golangci-lint - used in our containers
github.com/golangci/golangci-lint v1.44.0

// httperroryzer - provided as an optional linter
github.com/orijtech/httperroryzer v0.0.1

Expand All @@ -18,7 +21,4 @@ require (
// tomll - provided as an optional linter
github.com/pelletier/go-toml v1.9.4

// staticcheck - used in our containers
honnef.co/go/tools v0.2.2

)
4 changes: 2 additions & 2 deletions unstable/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

###############################################################################
# NOTE: This is the golangci-lint configuration file *specific* to the
# "unstable" variant of the containers provided by this project. This
# "unstable" variant of the container images provided by this project. This
# configuration (potentially) enables additional linters not used by the other
# container variants.
# container image variants.
###############################################################################

issues:
Expand Down
6 changes: 3 additions & 3 deletions unstable/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ LABEL org.opencontainers.image.source="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.documentation="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.url="https://github.com/atc0005/go-ci"
LABEL org.opencontainers.image.title="go-ci-unstable"
LABEL org.opencontainers.image.description="Docker container used to lint, build and test Go code. \
LABEL org.opencontainers.image.description="Docker container image used to lint, build and test Go code. \
Based on the latest available non-stable golang:beta image, \
golang:rc image or if not recently available, the latest stable golang image."
LABEL org.opencontainers.image.authors="Adam Chalkley (github.com/atc0005)"
Expand Down Expand Up @@ -64,7 +64,7 @@ COPY --from=builder /go/bin/structslop /usr/bin/structslop
COPY --from=builder /go/bin/tomll /usr/bin/tomll
COPY --from=builder /go/bin/errwrap /usr/bin/errwrap

# Copy over linting config files to root of container to serve as a default.
# Copy over linting config files to root of image to serve as a default.
# Projects bringing their own config files (e.g., via GitHub Actions) can
# easily override these files, while projects choosing to use these config
# files exclusively can omit their copy.
Expand All @@ -76,7 +76,7 @@ COPY --from=builder /go/bin/errwrap /usr/bin/errwrap
#
# The golangci-clint config file referenced below however IS a unique copy of
# the file specific to this image. Additional linters for testing (prior to
# enabling for all container variants) are enabled in this config file.
# enabling for all container image variants) are enabled in this config file.
# Changes to this file are synced to the main config file periodically once a
# linter/analyzer has proven stable enough for general use. See also GH-63.
COPY .markdownlint.yml /
Expand Down

0 comments on commit 2971c25

Please sign in to comment.