Perform a docker compose create during CI #18

Closed
2franix wants to merge 4 commits from docker_create_in_ci into main
Owner

docker compose build does not detect a missing secret.

`docker compose build` does not detect a missing secret.
Perform a docker compose create during CI
All checks were successful
CI / Lint and format files (pull_request) Successful in 35s
221abad9f8
`docker compose build` does not detect a missing secret.
Print env name
All checks were successful
CI / Lint and format files (pull_request) Successful in 33s
0644dbd75b
@ -63,3 +66,3 @@
- name: Build images
run: |
docker compose build
docker compose create --pull always --build
Author
Owner

This does not work because the environment must be selected first. Otherwise secrets are not available.

This does not work because the environment must be selected first. Otherwise secrets are not available.
Pause to debug workflow
All checks were successful
CI / Lint and format files (pull_request) Successful in 33s
24aa025c4d
Attempt to run in a container
All checks were successful
CI / Lint and format files (pull_request) Successful in 9s
15082ad1cd
@ -63,3 +69,3 @@
- name: Build images
run: |
docker compose build
docker compose create --pull always --build
Author
Owner

This does not work: the secrets cannot be mounted properly during build, because the actual files are hosted in a Docker-in-Docker daemon's folder that we don't know anything about.

This does not work: the secrets cannot be mounted properly during build, because the actual files are hosted in a Docker-in-Docker daemon's folder that we don't know anything about.
Author
Owner

Giving up for now. Accessing secrets is way too difficult from the container running the job. Example run based on this attempt: https://code.defx.fr/self-hosting/mpd/actions/runs/9

#29 [ch2] resolving provenance for metadata file
 Service ch2  Built
#29 DONE 0.4s
#30 [ch1] resolving provenance for metadata file
 Service ch1  Built
#30 DONE 0.0s
 Container project-rdc-1  Creating
Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /workspace/self-hosting/mpd/project/secrets/password.txt
  ❌  Failure - Main Build images
Giving up for now. Accessing secrets is way too difficult from the container running the job. Example run based on this attempt: https://code.defx.fr/self-hosting/mpd/actions/runs/9 ``` #29 [ch2] resolving provenance for metadata file Service ch2 Built #29 DONE 0.4s #30 [ch1] resolving provenance for metadata file Service ch1 Built #30 DONE 0.0s Container project-rdc-1 Creating Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /workspace/self-hosting/mpd/project/secrets/password.txt ❌ Failure - Main Build images ```
2franix closed this pull request 2025-02-02 15:03:44 +01:00
All checks were successful
CI / Lint and format files (pull_request) Successful in 9s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: self-hosting/workflows#18
No description provided.