Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions DEPLOYMENT_DOCKER.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,14 @@ jobs:

```yaml
docker-build:
image: docker:latest
image: docker:27.2.0
services:
- docker:dind
- docker:27.2.0-dind
before_script:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use GitLab's built-in registry credentials

When this sample is copied into a GitLab project without manually adding custom DOCKER_USERNAME and DOCKER_PASSWORD variables, this new before_script expands them to empty values and the job fails before the build. GitLab's container-registry docs use the predefined CI_REGISTRY, CI_REGISTRY_USER, and CI_REGISTRY_PASSWORD variables for CI authentication, so the example is no longer copy-pasteable for publishing from GitLab CI to the project's registry.

Useful? React with 👍 / 👎.

script:
- docker build -t lightning-decoder .
- docker tag lightning-decoder registry.gitlab.com/yourusername/lightning-decoder:latest
- docker push registry.gitlab.com/yourusername/lightning-decoder:latest
- docker build -t yourusername/lightning-decoder:$CI_COMMIT_SHORT_SHA .
- docker push yourusername/lightning-decoder:$CI_COMMIT_SHORT_SHA
```

## Troubleshooting
Expand Down
Loading