Skip to content

Commit

Permalink
enhanced container tips with defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
arichtman committed Aug 29, 2024
1 parent cf59ffb commit a912ad9
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion content/blog/gitlab-docker-compose-tips-n-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,28 @@ In order to maximise the cache coverage, point your registry FQDN at `gitlab.com
If you use further down-the-tree projects it'll work but not share them.

```Dockerfile
FROM gitlab.com/$<MY_GROUP_NAME>/dependency_proxy/containers/library/alpine:latest
FROM gitlab.com/silverrailtech/dependency_proxy/containers/library/alpine:latest
# Or
# Articulated for CI
ARG CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX
FROM $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/library/alpine:latest
# Or
# Articulated for CI and local override
# Can use Docker defaulting...
ARG MY_REGISTRY=docker.io
FROM $MY_REGISTRY/alpine:latest
# Or shell defaulting
ARG MY_REGISTRY
FROM ${MY_REGISTRY:-docker.io}/alpine:latest
```

For a GitLab job:

```YAML
job:
image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/alpine:latest
Expand Down

0 comments on commit a912ad9

Please sign in to comment.