`http://192.168.19.128:9902/` - Token
`46-cAq6zBGhsUEGZs8b5` - Tags
`Test` - Description
`Test` - Image
`docker` - Image version
`alpine:latest`
--- # 修改配置
### config.toml 修改 > 由安装时映射 路径` /docker/gitlab-runner/config`
```toml [[runners]] name = "Test" url = "http://192.168.19.128:9902/" token = "NPCM563xkdAg5-yYjPo9" executor = "docker" [runners.custom_build_dir] [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.cache.azure] [runners.docker] tls_verify = false image = "alpine:latest" privileged = false disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = false volumes = ["/docker/gitlab-runner/builds:/builds","/cache"] shm_size = 0 ``` 此处需要在`volumes`处将`/builds`映射到宿主机 ```Powershell #before volumes = ["/cache"]
#after volumes = ["/docker/gitlab-runner/builds:/builds","/cache"] ```
### .gitlab-ci.yml 修改 ```YAML image: mcr.microsoft.com/dotnet/sdk:latest
stages: - publish
publish-job: stage: publish script: - cd WebApplication1/WebApplication1 - dotnet publish -c Release --output /builds/publish tags: - Test ```
发布路径在宿主机为`/docker/gitlab-runner/builds/publish`