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

Local image documentation #2521

Merged
merged 1 commit into from
Oct 8, 2023
Merged
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
25 changes: 25 additions & 0 deletions docs/docs/20-usage/20-pipeline-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,31 @@ To make a private registry globally available check the [server configuration do

For specific details on configuring access to Google Container Registry, please view the docs [here](https://cloud.google.com/container-registry/docs/advanced-authentication#using_a_json_key_file).

##### Local Images

It's possible to build a local image by mounting the docker socket as a volume.

With a `Dockerfile` at the root of the project:

```diff
steps:
build-image:
image: docker
commands:
- docker build --rm -t local/project-image .
volumes:
- /var/run/docker.sock:/var/run/docker.sock
qwerty287 marked this conversation as resolved.
Show resolved Hide resolved

build-project:
image: local/project-image
commands:
- ./build.sh
```

:::warning
For this privileged rights are needed only available to admins. In addition this only works when using a single agent.
:::

### `commands`

Commands of every pipeline step are executed serially as if you would enter them into your local shell.
Expand Down