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

Secrets #52

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Secrets #52

wants to merge 2 commits into from

Conversation

roberth
Copy link
Member

@roberth roberth commented May 22, 2019

First commit should be decent, but didn't add much value to us without the second, which turns not to work very well with docker over ssh yet anyway, so, to be continued.

@portothree
Copy link

Hey, thanks for the work on Arion.
Is there any update on secrets support? I really want to mount docker secrets into my services

@KiaraGrouwstra
Copy link
Contributor

KiaraGrouwstra commented Aug 2, 2024

it looks like the long syntax is limited to Docker Swarm, in my understanding limiting its use in Arion.

(before stumbling upon this PR) i tried implementing the short syntax (see #255).

KiaraGrouwstra added a commit to KiaraGrouwstra/arion that referenced this pull request Aug 2, 2024
enables using [docker compose secrets](https://docs.docker.com/compose/use-secrets/)
from arion, which includes:

- [top-level `secrets` element](https://docs.docker.com/compose/compose-file/09-secrets/)
defining the secrets to be used
for the below two use-cases,
exposing them at `/run/secrets/<secret_name>`.
comes in flavors `file` vs `environment`.
- run-time: [`services` top-level `secrets` element](https://docs.docker.com/compose/compose-file/05-services/#secrets)
- build time: [build secrets](https://docs.docker.com/build/building/secrets/)
(to be [mounted](https://docs.docker.com/build/building/secrets/#secret-mounts)
in the `Dockerfile` like
`RUN --mount=type=secret,id=<secret_name> ...`)

unlike hercules-ci#52, i did not so far add support for their
[long syntax](https://docs.docker.com/compose/compose-file/05-services/#long-syntax-4),
which despite the confusing documentation appears
[limited to Docker Swarm](docker/compose#9648 (comment)),
in my understanding limiting its use in Arion.
KiaraGrouwstra added a commit to KiaraGrouwstra/arion that referenced this pull request Aug 2, 2024
enables using [docker compose secrets](https://docs.docker.com/compose/use-secrets/)
from arion, which includes:

- [top-level `secrets` element](https://docs.docker.com/compose/compose-file/09-secrets/)
defining the secrets to be used
for the below two use-cases,
exposing them at `/run/secrets/<secret_name>`.
comes in flavors `file` vs `environment`.
- run-time: [`services` top-level `secrets` element](https://docs.docker.com/compose/compose-file/05-services/#secrets)
- build time: [build secrets](https://docs.docker.com/build/building/secrets/)
(to be [mounted](https://docs.docker.com/build/building/secrets/#secret-mounts)
in the `Dockerfile` like
`RUN --mount=type=secret,id=<secret_name> ...`)

unlike hercules-ci#52, i did not so far add support for their
[long syntax](https://docs.docker.com/compose/compose-file/05-services/#long-syntax-4),
which despite the confusing documentation appears
[limited to Docker Swarm](docker/compose#9648 (comment)),
in my understanding limiting its use in Arion.
KiaraGrouwstra added a commit to KiaraGrouwstra/arion that referenced this pull request Aug 2, 2024
enables using [docker compose secrets](https://docs.docker.com/compose/use-secrets/)
from arion, which includes:

- [top-level `secrets` element](https://docs.docker.com/compose/compose-file/09-secrets/)
defining the secrets to be used
for the below two use-cases,
exposing them at `/run/secrets/<secret_name>`.
comes in flavors `file` vs `environment`.
- run-time: [`services` top-level `secrets` element](https://docs.docker.com/compose/compose-file/05-services/#secrets)
- build time: [build secrets](https://docs.docker.com/build/building/secrets/)
(to be [mounted](https://docs.docker.com/build/building/secrets/#secret-mounts)
in the `Dockerfile` like
`RUN --mount=type=secret,id=<secret_name> ...`)

unlike hercules-ci#52, i did not so far add support for their
[long syntax](https://docs.docker.com/compose/compose-file/05-services/#long-syntax-4),
which despite the confusing documentation appears
[limited to Docker Swarm](docker/compose#9648 (comment)),
in my understanding limiting its use in Arion.
KiaraGrouwstra added a commit to KiaraGrouwstra/arion that referenced this pull request Aug 2, 2024
enables using [docker compose secrets](https://docs.docker.com/compose/use-secrets/)
from arion, which includes:

- [top-level `secrets` element](https://docs.docker.com/compose/compose-file/09-secrets/)
defining the secrets to be used
for the below two use-cases,
exposing them at `/run/secrets/<secret_name>`.
comes in flavors `file` vs `environment`.
- run-time: [`services` top-level `secrets` element](https://docs.docker.com/compose/compose-file/05-services/#secrets)
- build time: [build secrets](https://docs.docker.com/build/building/secrets/)
(to be [mounted](https://docs.docker.com/build/building/secrets/#secret-mounts)
in the `Dockerfile` like
`RUN --mount=type=secret,id=<secret_name> ...`)

unlike hercules-ci#52, i did not so far add support for their
[long syntax](https://docs.docker.com/compose/compose-file/05-services/#long-syntax-4),
which despite the confusing documentation appears
[limited to Docker Swarm](docker/compose#9648 (comment)),
in my understanding limiting its use in Arion.
@KiaraGrouwstra
Copy link
Contributor

i now realize this PR did not yet do compose build secrets, which allow limiting exposing the secret to given build steps rather than needing them available at run-time.

fyi i had tried rebasing this PR, tho i hadn't immediately gotten it to work (nix flake check error: 'The option project.name is used but not defined').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants