123
This commit is contained in:
parent
7db99e0fa6
commit
eae3ffd86a
4 changed files with 68 additions and 85 deletions
43
.github/README.md
vendored
Normal file
43
.github/README.md
vendored
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
# Docker Daemon WoodpeckerCI Plugin
|
||||||
|
|
||||||
|
[](https://hub.docker.com/r/kokuwaio/dockerd)
|
||||||
|
[](https://hub.docker.com/r/kokuwaio/dockerd)
|
||||||
|
[](https://git.kokuwa.io/woodpecker/dockerd/src/branch/main/Dockerfile)
|
||||||
|
[](https://git.kokuwa.io/woodpecker/dockerd/src/branch/main/LICENSE)
|
||||||
|
[](https://git.kokuwa.io/woodpecker/dockerd/pulls)
|
||||||
|
[](https://git.kokuwa.io/woodpecker/dockerd/issues)
|
||||||
|
|
||||||
|
A [Woodpecker I](https://woodpecker-ci.org) prepared docker daemon.
|
||||||
|
Also usable with Gitlab, Github or locally, see examples for usage.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- includes rootless
|
||||||
|
- configures mirror for dockerd
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
|
||||||
|
services:
|
||||||
|
- name: dockerd
|
||||||
|
image: kokuwaio/dockerd
|
||||||
|
ports: [2375, 8080]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
info:
|
||||||
|
image: kokuwaio/docker-cli
|
||||||
|
commands: docker info
|
||||||
|
environment:
|
||||||
|
DOCKER_HOST: tcp://dockerd:2375
|
||||||
|
```
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
|
||||||
|
| Environment | Default | Description |
|
||||||
|
| ------------------------- | ------- | ---------------------------------------------------------------------------------- |
|
||||||
|
| DOCKERD_PORT | `2375` | Specifies the port to listen on |
|
||||||
|
| DOCKERD_SHUTDOWN_TIMEOUT | `0` | Set the default shutdown timeout |
|
||||||
|
| DOCKERD_LOG_LEVEL | `none` | Set the [logging level](https://docs.docker.com/reference/cli/dockerd/#log-format) |
|
||||||
|
| DOCKERD_REGISTRY_MIRROR | `none` | Specifies a list of registry mirrors. |
|
||||||
|
| DOCKERD_INSECURE_REGISTRY | `none | Configure [insecure registry](https://docs.docker.com/reference/cli/dockerd/#insecure-registries) |
|
|
@ -1,9 +1,8 @@
|
||||||
when:
|
when:
|
||||||
instance: ci.kokuwa.io
|
instance: ci.kokuwa.io
|
||||||
repo: woodpecker/dockerd
|
repo: woodpecker/dockerd
|
||||||
event: [manual, push, pull_request]
|
event: pull_request
|
||||||
branch: main
|
path: [.woodpecker/build.yaml, .woodpecker/test.yaml, Dockerfile, Dockerfile.dockerignore, entrypoint.sh]
|
||||||
path: [.woodpecker/build.yaml, Dockerfile, Dockerfile.dockerignore, entrypoint.sh]
|
|
||||||
|
|
||||||
depends_on: [build]
|
depends_on: [build]
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -11,26 +10,21 @@ matrix:
|
||||||
labels:
|
labels:
|
||||||
platform: linux/${PLATFORM}
|
platform: linux/${PLATFORM}
|
||||||
|
|
||||||
|
services:
|
||||||
|
- name: dockerd
|
||||||
|
image: registry.kokuwa.io/kokuwaio/dockerd:ci-${CI_PIPELINE_NUMBER}
|
||||||
|
ports: [2375]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
pr:
|
info:
|
||||||
image: registry.kokuwa.io/kokuwaio/dockerd:ci-${CI_PIPELINE_NUMBER}
|
image: kokuwaio/docker-cli
|
||||||
commands: dockerd --version
|
commands: docker info
|
||||||
when:
|
environment:
|
||||||
event: pull_request
|
DOCKER_HOST: tcp://dockerd:2375
|
||||||
|
|
||||||
kokuwa.io: &version
|
pull:
|
||||||
image: registry.kokuwa.io/kokuwaio/dockerd
|
image: kokuwaio/docker-cli
|
||||||
pull: true
|
commands: docker pull bash
|
||||||
commands: dockerd --version
|
environment:
|
||||||
when:
|
DOCKER_HOST: tcp://dockerd:2375
|
||||||
event: [manual, push]
|
|
||||||
branch: main
|
|
||||||
|
|
||||||
docker.io:
|
|
||||||
image: docker.io/kokuwaio/dockerd
|
|
||||||
<<: *version
|
|
||||||
|
|
||||||
ghcr.io:
|
|
||||||
image: ghcr.io/kokuwaio/dockerd
|
|
||||||
<<: *version
|
|
||||||
|
|
67
README.md
67
README.md
|
@ -1,64 +1,13 @@
|
||||||
# Docker Daemon WoodpeckerCI Plugin
|
# Docker Daemon WoodpeckerCI Plugin
|
||||||
|
|
||||||
[](https://hub.docker.com/repository/docker/kokuwaio/dockerhub-metadata)
|
[](https://hub.docker.com/r/kokuwaio/dockerd)
|
||||||
[](https://hub.docker.com/repository/docker/kokuwaio/dockerhub-metadata)
|
[](https://hub.docker.com/r/kokuwaio/dockerd)
|
||||||
[](https://github.com/kokuwaio/dockerhub-metadata/blob/main/Dockerfile)
|
[](https://git.kokuwa.io/woodpecker/dockerd/src/branch/main/Dockerfile)
|
||||||
[](https://github.com/kokuwaio/dockerhub-metadata/blob/main/LICENSE)
|
[](https://git.kokuwa.io/woodpecker/dockerd/src/branch/main/LICENSE)
|
||||||
[](https://github.com/kokuwaio/dockerhub-metadata/issues)
|
[](https://git.kokuwa.io/woodpecker/dockerd/pulls)
|
||||||
|
[](https://git.kokuwa.io/woodpecker/dockerd/issues)
|
||||||
|
|
||||||
A [Woodpecker CI](https://woodpecker-ci.org) prepared docker daemon.
|
A [Woodpecker I](https://woodpecker-ci.org) prepared docker daemon.
|
||||||
Also usable with Gitlab, Github or locally, see examples for usage.
|
Also usable with Gitlab, Github or locally, see examples for usage.
|
||||||
|
|
||||||
## Features
|
For more documention see: [git.kokuwa.io/woodpecker/dockerd](https://git.kokuwa.io/woodpecker/dockerd)
|
||||||
|
|
||||||
- set full description in repository from local file
|
|
||||||
- set short description in repository from settings
|
|
||||||
- set categories for repository
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
Woodpecker:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
steps:
|
|
||||||
dockerhub:
|
|
||||||
image: kokuwaio/dockerhub-metadata
|
|
||||||
depends_on: []
|
|
||||||
settings:
|
|
||||||
repository: kokuwaio/example-image
|
|
||||||
description-short: This image does that!
|
|
||||||
categories: [developer-tools, integration-and-delivery]
|
|
||||||
username: {from_secret: DOCKERHUB_USERNAME}
|
|
||||||
password: {from_secret: DOCKERHUB_PASSWORD}
|
|
||||||
when:
|
|
||||||
event: push
|
|
||||||
branch: main
|
|
||||||
path: README.md
|
|
||||||
```
|
|
||||||
|
|
||||||
Gitlab:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
dockerhub:
|
|
||||||
stage: deploy
|
|
||||||
needs: []
|
|
||||||
image: kokuwaio/hadolint
|
|
||||||
variables:
|
|
||||||
PLUGIN_REPOSITORY: kokuwaio/example-image
|
|
||||||
PLUGIN_DESCRIPTION_SHORT: This image does that!
|
|
||||||
PLUGIN_CATEGORIES: developer-tools,integration-and-delivery
|
|
||||||
rules:
|
|
||||||
- if: $CI_PIPELINE_SOURCE == "push"
|
|
||||||
changes: [README.md]
|
|
||||||
```
|
|
||||||
|
|
||||||
## Settings
|
|
||||||
|
|
||||||
| Settings Name | Environment | Default | Description |
|
|
||||||
| ------------------- | ------------------------ | ----------- | ----------------------------------------------------------- |
|
|
||||||
| `repository` | PLUGIN_DOCKER_PORT | `none` | Repository to update with metadata, e.g. `kokuwaio/example` |
|
|
||||||
| `description-short` | PLUGIN_DESCRIPTION_SHORT | `none` | Short description for repository. |
|
|
||||||
| `description-file` | PLUGIN_DESCRIPTION_FILE | `README.md` | File to read full description from |
|
|
||||||
| `categories` | PLUGIN_CATEGORIES | `[]` | List of categories to set (maximum 3) |
|
|
||||||
| `username` | PLUGIN_USERNAME | `none` | Username for Dockerhub login |
|
|
||||||
| `password` | PLUGIN_PASSWORD | `none` | Password for Dockerhub login, **PAT** is not supported! |
|
|
||||||
|
|
|
@ -8,9 +8,6 @@ set -e;
|
||||||
##
|
##
|
||||||
|
|
||||||
COMMAND="dockerd --rootless --host=0.0.0.0:${DOCKERD_PORT:-2375} --tls=false --data-root=/woodpecker/docker --shutdown-timeout=${DOCKERD_SHUTDOWN_TIMEOUT:-0} --feature=buildkit=true --feature=containerd-snapshotter=true"
|
COMMAND="dockerd --rootless --host=0.0.0.0:${DOCKERD_PORT:-2375} --tls=false --data-root=/woodpecker/docker --shutdown-timeout=${DOCKERD_SHUTDOWN_TIMEOUT:-0} --feature=buildkit=true --feature=containerd-snapshotter=true"
|
||||||
if [[ "${DOCKERD_ROOTLESS:-true}" == "true" ]]; then
|
|
||||||
COMMAND+=" "
|
|
||||||
fi
|
|
||||||
if [[ -n "$DOCKERD_LOG_LEVEL" ]]; then
|
if [[ -n "$DOCKERD_LOG_LEVEL" ]]; then
|
||||||
COMMAND+=" --log-level=$DOCKERD_LOG_LEVEL"
|
COMMAND+=" --log-level=$DOCKERD_LOG_LEVEL"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue