Added timeout and data

This commit is contained in:
nyan404 committed 2026-06-27 22:17:10 +03:00
1 parent 643aed964a
commit cd6a594ed4
4 files changed
+16 -10

No files matched your search

+3
View File
@@ -11,6 +11,9 @@ build:
- docker:29.6.1-dind - docker:29.6.1-dind
variables: variables:
DOCKER_TLS_CERTDIR: "" DOCKER_TLS_CERTDIR: ""
before_script:
- for i in $(seq 1 60); do docker info >/dev/null 2>&1 && break; echo "waiting for docker daemon ($i/60)"; sleep 1; done
- docker info >/dev/null 2>&1
script: script:
# Docker Registry # Docker Registry
- echo "$DOCKER_PASSWORD" | docker login $DOCKER_REGISTRY -u "$DOCKER_USERNAME" --password-stdin - echo "$DOCKER_PASSWORD" | docker login $DOCKER_REGISTRY -u "$DOCKER_USERNAME" --password-stdin
+4 -3
View File
@@ -6,13 +6,14 @@
## Working Rules ## Working Rules
- Keep changes minimal and focused on the CI file unless new project files are intentionally being added. - Keep changes minimal and focused on the CI file unless new project files are intentionally being added.
- Prefer the host Docker socket path `unix:///var/run/docker.sock` for image build/push jobs instead of `docker:dind`. - Prefer `docker:dind` for this project unless the target runner is explicitly pinned and known to expose `/var/run/docker.sock`.
- If the runner setup changes, update the CI file and this document together. - If the runner setup changes, update the CI file and this document together.
## Validation ## Validation
- For CI-only changes, prefer a targeted YAML parse and a diff review. - For CI-only changes, prefer a targeted YAML parse and a diff review.
- For image/runtime changes, check the `Dockerfile` and Nginx config together with the CI job. - For image/runtime changes, check the `Dockerfile`, Nginx config, and the CI job together.
- Do not add unnecessary local build artifacts or temporary files to the repository. - Do not add unnecessary local build artifacts or temporary files to the repository.
## Notes ## Notes
- The GitLab runner must expose `/var/run/docker.sock` inside the job container for the pipeline to work. - `docker:dind` requires a privileged Docker executor and `DOCKER_HOST=tcp://docker:2375` with `DOCKER_TLS_CERTDIR=""`.
- The `dind` daemon can take time to initialize; this repo waits for `docker info` before building.
+3 -2
View File
@@ -2,6 +2,7 @@
- The repository packages a static site under `web/` with an Nginx-based `Dockerfile`. - The repository packages a static site under `web/` with an Nginx-based `Dockerfile`.
- The GitLab pipeline builds and pushes `cwshed:latest` from `.gitlab-ci.yml`. - The GitLab pipeline builds and pushes `cwshed:latest` from `.gitlab-ci.yml`.
- Docker builds are expected to run through the mounted host socket at `unix:///var/run/docker.sock`. - Docker builds are expected to run through `docker:dind` with `DOCKER_HOST=tcp://docker:2375` and `DOCKER_TLS_CERTDIR=""`.
- The build job now waits for `docker info` before running `docker login` and `docker build` because `docker:29.6.1-dind` can take ~20 seconds to finish initialization on `docker-03`.
- Current CI image: `docker:29.6.1-cli`. - Current CI image: `docker:29.6.1-cli`.
- The runner host at `root@10.3.1.168` is `docker-host-1`; its GitLab Runner is `ryzen-runner-dind` and needs `/var/run/docker.sock` bind-mounted for this repo's CI job. - The runner host at `root@10.3.1.236` is `docker-03.homelab.local`; its GitLab Runner is `stage-zone-runner` and successfully reaches `docker:29.6.1-dind`.
+6 -5
View File
@@ -10,11 +10,12 @@
## Runtime / Deployment ## Runtime / Deployment
- GitLab CI runs the build job. - GitLab CI runs the build job.
- The job now talks to Docker through `unix:///var/run/docker.sock` instead of a `docker:dind` service. - The job builds through `docker:dind` with `DOCKER_HOST=tcp://docker:2375` and `DOCKER_TLS_CERTDIR=""`.
- The GitLab runner must mount the host socket into the job container. - The job waits for `docker info` to succeed before starting the build, because the daemon may need a few seconds to come up.
- The runner does not need the host Docker socket mounted for this repo.
- The resulting image is `cwshed:latest` in `$DOCKER_REGISTRY`. - The resulting image is `cwshed:latest` in `$DOCKER_REGISTRY`.
- Remote runner host: `root@10.3.1.168` (`docker-host-1`), GitLab Runner `ryzen-runner-dind`, Docker executor, with `/var/run/docker.sock` bind-mounted into the job container. - Remote runner host: `root@10.3.1.236` (`docker-03.homelab.local`), GitLab Runner `stage-zone-runner`, Docker executor, privileged, with `docker:29.6.1-dind` as the service image.
## Change Log ## Change Log
- 2026-06-27: updated the Docker CI image to `docker:29.6.1-cli` and switched the pipeline from TCP dind to the Unix socket path. - 2026-06-27: updated the Docker CI image to `docker:29.6.1-cli` and aligned the pipeline to `docker:dind` with `DOCKER_HOST=tcp://docker:2375`.
- 2026-06-27: updated the GitLab Runner config on `docker-host-1` to mount `/var/run/docker.sock`, then restarted `gitlab-runner`. - 2026-06-27: verified the working runner on `docker-03.homelab.local` and confirmed `docker:29.6.1-dind` is reachable from the job network.