mirror of
https://github.com/thegeeklab/drone-docker.git
synced 2024-06-02 08:29:50 +02:00
Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
c9b8ea3c6a | |||
|
2c152cce3c | ||
63baa5cc0d | |||
|
e35e3f6208 | ||
|
9bef137ed6 | ||
fbc9427cda | |||
5303f6a5ca | |||
|
dd6fc6ce42 | ||
|
dd65477400 | ||
5848ea5719 | |||
|
9b558675eb | ||
81094ee3c5 | |||
|
0e88134cab | ||
|
d9a5ee9d4f | ||
|
afe0ab1105 | ||
|
c77d8d07b7 | ||
|
76e1cc61ec | ||
|
15da7b71db | ||
|
afaaed742d | ||
|
3409c7c2ac | ||
|
17da5790a1 | ||
992117783a | |||
|
7482633d35 | ||
|
59800776fc | ||
d6219f41df | |||
2932e7c616 |
|
@ -10,3 +10,4 @@ json
|
||||||
config
|
config
|
||||||
host:ip
|
host:ip
|
||||||
multiarch
|
multiarch
|
||||||
|
DockerHub
|
||||||
|
|
|
@ -8,7 +8,7 @@ local PipelineTest = {
|
||||||
steps: [
|
steps: [
|
||||||
{
|
{
|
||||||
name: 'deps',
|
name: 'deps',
|
||||||
image: 'golang:1.18',
|
image: 'golang:1.19',
|
||||||
commands: [
|
commands: [
|
||||||
'make deps',
|
'make deps',
|
||||||
],
|
],
|
||||||
|
@ -21,7 +21,7 @@ local PipelineTest = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'lint',
|
name: 'lint',
|
||||||
image: 'golang:1.18',
|
image: 'golang:1.19',
|
||||||
commands: [
|
commands: [
|
||||||
'make lint',
|
'make lint',
|
||||||
],
|
],
|
||||||
|
@ -34,7 +34,7 @@ local PipelineTest = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'test',
|
name: 'test',
|
||||||
image: 'golang:1.18',
|
image: 'golang:1.19',
|
||||||
commands: [
|
commands: [
|
||||||
'make test',
|
'make test',
|
||||||
],
|
],
|
||||||
|
@ -68,8 +68,9 @@ local PipelineBuildBinaries = {
|
||||||
steps: [
|
steps: [
|
||||||
{
|
{
|
||||||
name: 'build',
|
name: 'build',
|
||||||
image: 'techknowlogick/xgo:go-1.18.x',
|
image: 'techknowlogick/xgo:go-1.19.x',
|
||||||
commands: [
|
commands: [
|
||||||
|
'ln -s /drone/src /source',
|
||||||
'make release',
|
'make release',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -133,14 +134,14 @@ local PipelineBuildContainer(arch='amd64') = {
|
||||||
steps: [
|
steps: [
|
||||||
{
|
{
|
||||||
name: 'build',
|
name: 'build',
|
||||||
image: 'golang:1.18',
|
image: 'golang:1.19',
|
||||||
commands: [
|
commands: [
|
||||||
'make build',
|
'make build',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'dryrun',
|
name: 'dryrun',
|
||||||
image: 'thegeeklab/drone-docker:19',
|
image: 'thegeeklab/drone-docker:20',
|
||||||
settings: {
|
settings: {
|
||||||
dry_run: true,
|
dry_run: true,
|
||||||
dockerfile: 'docker/Dockerfile.' + arch,
|
dockerfile: 'docker/Dockerfile.' + arch,
|
||||||
|
@ -153,7 +154,7 @@ local PipelineBuildContainer(arch='amd64') = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'publish-dockerhub',
|
name: 'publish-dockerhub',
|
||||||
image: 'thegeeklab/drone-docker:19',
|
image: 'thegeeklab/drone-docker:20',
|
||||||
settings: {
|
settings: {
|
||||||
auto_tag: true,
|
auto_tag: true,
|
||||||
auto_tag_suffix: arch,
|
auto_tag_suffix: arch,
|
||||||
|
@ -169,7 +170,7 @@ local PipelineBuildContainer(arch='amd64') = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'publish-quay',
|
name: 'publish-quay',
|
||||||
image: 'thegeeklab/drone-docker:19',
|
image: 'thegeeklab/drone-docker:20',
|
||||||
settings: {
|
settings: {
|
||||||
auto_tag: true,
|
auto_tag: true,
|
||||||
auto_tag_suffix: arch,
|
auto_tag_suffix: arch,
|
||||||
|
@ -213,9 +214,8 @@ local PipelineDocs = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'spellcheck',
|
name: 'spellcheck',
|
||||||
image: 'node:lts-alpine',
|
image: 'thegeeklab/alpine-tools',
|
||||||
commands: [
|
commands: [
|
||||||
'npm install -g spellchecker-cli',
|
|
||||||
"spellchecker --files '_docs/**/*.md' 'README.md' 'CONTRIBUTING.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions",
|
"spellchecker --files '_docs/**/*.md' 'README.md' 'CONTRIBUTING.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions",
|
||||||
],
|
],
|
||||||
environment: {
|
environment: {
|
||||||
|
@ -241,7 +241,6 @@ local PipelineDocs = {
|
||||||
'build-binaries',
|
'build-binaries',
|
||||||
'build-container-amd64',
|
'build-container-amd64',
|
||||||
'build-container-arm64',
|
'build-container-arm64',
|
||||||
'build-container-arm',
|
|
||||||
],
|
],
|
||||||
trigger: {
|
trigger: {
|
||||||
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
|
ref: ['refs/heads/main', 'refs/tags/**', 'refs/pull/**'],
|
||||||
|
@ -345,7 +344,6 @@ local PipelineNotifications = {
|
||||||
PipelineBuildBinaries,
|
PipelineBuildBinaries,
|
||||||
PipelineBuildContainer(arch='amd64'),
|
PipelineBuildContainer(arch='amd64'),
|
||||||
PipelineBuildContainer(arch='arm64'),
|
PipelineBuildContainer(arch='arm64'),
|
||||||
PipelineBuildContainer(arch='arm'),
|
|
||||||
PipelineDocs,
|
PipelineDocs,
|
||||||
PipelineNotifications,
|
PipelineNotifications,
|
||||||
]
|
]
|
||||||
|
|
103
.drone.yml
103
.drone.yml
|
@ -8,7 +8,7 @@ platform:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: deps
|
- name: deps
|
||||||
image: golang:1.18
|
image: golang:1.19
|
||||||
commands:
|
commands:
|
||||||
- make deps
|
- make deps
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -16,7 +16,7 @@ steps:
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
- name: lint
|
- name: lint
|
||||||
image: golang:1.18
|
image: golang:1.19
|
||||||
commands:
|
commands:
|
||||||
- make lint
|
- make lint
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -24,7 +24,7 @@ steps:
|
||||||
path: /go
|
path: /go
|
||||||
|
|
||||||
- name: test
|
- name: test
|
||||||
image: golang:1.18
|
image: golang:1.19
|
||||||
commands:
|
commands:
|
||||||
- make test
|
- make test
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -51,8 +51,9 @@ platform:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: techknowlogick/xgo:go-1.18.x
|
image: techknowlogick/xgo:go-1.19.x
|
||||||
commands:
|
commands:
|
||||||
|
- ln -s /drone/src /source
|
||||||
- make release
|
- make release
|
||||||
|
|
||||||
- name: executable
|
- name: executable
|
||||||
|
@ -105,12 +106,12 @@ platform:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: golang:1.18
|
image: golang:1.19
|
||||||
commands:
|
commands:
|
||||||
- make build
|
- make build
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
image: thegeeklab/drone-docker:19
|
image: thegeeklab/drone-docker:20
|
||||||
settings:
|
settings:
|
||||||
dockerfile: docker/Dockerfile.amd64
|
dockerfile: docker/Dockerfile.amd64
|
||||||
dry_run: true
|
dry_run: true
|
||||||
|
@ -122,7 +123,7 @@ steps:
|
||||||
- build
|
- build
|
||||||
|
|
||||||
- name: publish-dockerhub
|
- name: publish-dockerhub
|
||||||
image: thegeeklab/drone-docker:19
|
image: thegeeklab/drone-docker:20
|
||||||
settings:
|
settings:
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
auto_tag_suffix: amd64
|
auto_tag_suffix: amd64
|
||||||
|
@ -140,7 +141,7 @@ steps:
|
||||||
- dryrun
|
- dryrun
|
||||||
|
|
||||||
- name: publish-quay
|
- name: publish-quay
|
||||||
image: thegeeklab/drone-docker:19
|
image: thegeeklab/drone-docker:20
|
||||||
settings:
|
settings:
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
auto_tag_suffix: amd64
|
auto_tag_suffix: amd64
|
||||||
|
@ -177,12 +178,12 @@ platform:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: golang:1.18
|
image: golang:1.19
|
||||||
commands:
|
commands:
|
||||||
- make build
|
- make build
|
||||||
|
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
image: thegeeklab/drone-docker:19
|
image: thegeeklab/drone-docker:20
|
||||||
settings:
|
settings:
|
||||||
dockerfile: docker/Dockerfile.arm64
|
dockerfile: docker/Dockerfile.arm64
|
||||||
dry_run: true
|
dry_run: true
|
||||||
|
@ -194,7 +195,7 @@ steps:
|
||||||
- build
|
- build
|
||||||
|
|
||||||
- name: publish-dockerhub
|
- name: publish-dockerhub
|
||||||
image: thegeeklab/drone-docker:19
|
image: thegeeklab/drone-docker:20
|
||||||
settings:
|
settings:
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
auto_tag_suffix: arm64
|
auto_tag_suffix: arm64
|
||||||
|
@ -212,7 +213,7 @@ steps:
|
||||||
- dryrun
|
- dryrun
|
||||||
|
|
||||||
- name: publish-quay
|
- name: publish-quay
|
||||||
image: thegeeklab/drone-docker:19
|
image: thegeeklab/drone-docker:20
|
||||||
settings:
|
settings:
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
auto_tag_suffix: arm64
|
auto_tag_suffix: arm64
|
||||||
|
@ -239,78 +240,6 @@ trigger:
|
||||||
depends_on:
|
depends_on:
|
||||||
- test
|
- test
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: build-container-arm
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: arm
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build
|
|
||||||
image: golang:1.18
|
|
||||||
commands:
|
|
||||||
- make build
|
|
||||||
|
|
||||||
- name: dryrun
|
|
||||||
image: thegeeklab/drone-docker:19
|
|
||||||
settings:
|
|
||||||
dockerfile: docker/Dockerfile.arm
|
|
||||||
dry_run: true
|
|
||||||
repo: thegeeklab/${DRONE_REPO_NAME}
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/pull/**
|
|
||||||
depends_on:
|
|
||||||
- build
|
|
||||||
|
|
||||||
- name: publish-dockerhub
|
|
||||||
image: thegeeklab/drone-docker:19
|
|
||||||
settings:
|
|
||||||
auto_tag: true
|
|
||||||
auto_tag_suffix: arm
|
|
||||||
dockerfile: docker/Dockerfile.arm
|
|
||||||
password:
|
|
||||||
from_secret: docker_password
|
|
||||||
repo: thegeeklab/${DRONE_REPO_NAME}
|
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/heads/main
|
|
||||||
- refs/tags/**
|
|
||||||
depends_on:
|
|
||||||
- dryrun
|
|
||||||
|
|
||||||
- name: publish-quay
|
|
||||||
image: thegeeklab/drone-docker:19
|
|
||||||
settings:
|
|
||||||
auto_tag: true
|
|
||||||
auto_tag_suffix: arm
|
|
||||||
dockerfile: docker/Dockerfile.arm
|
|
||||||
password:
|
|
||||||
from_secret: quay_password
|
|
||||||
registry: quay.io
|
|
||||||
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
|
||||||
username:
|
|
||||||
from_secret: quay_username
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/heads/main
|
|
||||||
- refs/tags/**
|
|
||||||
depends_on:
|
|
||||||
- dryrun
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
ref:
|
|
||||||
- refs/heads/main
|
|
||||||
- refs/tags/**
|
|
||||||
- refs/pull/**
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- test
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: docs
|
name: docs
|
||||||
|
@ -329,9 +258,8 @@ steps:
|
||||||
- markdownlint 'docs/content/**/*.md' 'README.md' 'CONTRIBUTING.md'
|
- markdownlint 'docs/content/**/*.md' 'README.md' 'CONTRIBUTING.md'
|
||||||
|
|
||||||
- name: spellcheck
|
- name: spellcheck
|
||||||
image: node:lts-alpine
|
image: thegeeklab/alpine-tools
|
||||||
commands:
|
commands:
|
||||||
- npm install -g spellchecker-cli
|
|
||||||
- spellchecker --files '_docs/**/*.md' 'README.md' 'CONTRIBUTING.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions
|
- spellchecker --files '_docs/**/*.md' 'README.md' 'CONTRIBUTING.md' -d .dictionary -p spell indefinite-article syntax-urls --no-suggestions
|
||||||
environment:
|
environment:
|
||||||
FORCE_COLOR: true
|
FORCE_COLOR: true
|
||||||
|
@ -360,7 +288,6 @@ depends_on:
|
||||||
- build-binaries
|
- build-binaries
|
||||||
- build-container-amd64
|
- build-container-amd64
|
||||||
- build-container-arm64
|
- build-container-arm64
|
||||||
- build-container-arm
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
@ -454,6 +381,6 @@ depends_on:
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 9272f58ad1c23c3d09fe6d4c61d4f6343c9fc70229826a55c45179182b6e5f49
|
hmac: 2678272f471334df973c0b9c0e8886dcf0941f5581b460b116fb48c88e7a14ba
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
5
.github/settings.yml
vendored
5
.github/settings.yml
vendored
|
@ -52,14 +52,17 @@ branches:
|
||||||
strict: false
|
strict: false
|
||||||
contexts:
|
contexts:
|
||||||
- continuous-integration/drone/pr
|
- continuous-integration/drone/pr
|
||||||
enforce_admins: null
|
enforce_admins: true
|
||||||
|
required_linear_history: true
|
||||||
restrictions: null
|
restrictions: null
|
||||||
- name: docs
|
- name: docs
|
||||||
protection:
|
protection:
|
||||||
required_pull_request_reviews: null
|
required_pull_request_reviews: null
|
||||||
required_status_checks: null
|
required_status_checks: null
|
||||||
enforce_admins: true
|
enforce_admins: true
|
||||||
|
required_linear_history: true
|
||||||
restrictions:
|
restrictions:
|
||||||
|
apps: []
|
||||||
users: []
|
users: []
|
||||||
teams:
|
teams:
|
||||||
- bot
|
- bot
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -1,7 +1,7 @@
|
||||||
# renovate: datasource=github-releases depName=mvdan/gofumpt
|
# renovate: datasource=github-releases depName=mvdan/gofumpt
|
||||||
GOFUMPT_PACKAGE_VERSION := v0.3.1
|
GOFUMPT_PACKAGE_VERSION := v0.4.0
|
||||||
# renovate: datasource=github-releases depName=golangci/golangci-lint
|
# renovate: datasource=github-releases depName=golangci/golangci-lint
|
||||||
GOLANGCI_LINT_PACKAGE_VERSION := v1.46.2
|
GOLANGCI_LINT_PACKAGE_VERSION := v1.50.1
|
||||||
|
|
||||||
EXECUTABLE := drone-docker
|
EXECUTABLE := drone-docker
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@ GOLANGCI_LINT_PACKAGE ?= github.com/golangci/golangci-lint/cmd/golangci-lint@$(G
|
||||||
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
|
||||||
|
|
||||||
GENERATE ?=
|
GENERATE ?=
|
||||||
XGO_VERSION := go-1.18.x
|
XGO_VERSION := go-1.19.x
|
||||||
XGO_TARGETS ?= linux/amd64,linux/arm-6,linux/arm-7,linux/arm64
|
XGO_TARGETS ?= linux/amd64,linux/arm64
|
||||||
|
|
||||||
TAGS ?= netgo
|
TAGS ?= netgo
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# drone-docker
|
# drone-docker
|
||||||
|
|
||||||
|
> DISCONTINUED: This image is no longer maintained and will be removed in the future.
|
||||||
|
|
||||||
Drone plugin to build multiarch Docker images
|
Drone plugin to build multiarch Docker images
|
||||||
|
|
||||||
[![Build Status](https://img.shields.io/drone/build/thegeeklab/drone-docker?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/drone-docker)
|
[![Build Status](https://img.shields.io/drone/build/thegeeklab/drone-docker?logo=drone&server=https%3A%2F%2Fdrone.thegeeklab.de)](https://drone.thegeeklab.de/thegeeklab/drone-docker)
|
||||||
|
@ -10,7 +12,7 @@ Drone plugin to build multiarch Docker images
|
||||||
[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/drone-docker)
|
[![Source: GitHub](https://img.shields.io/badge/source-github-blue.svg?logo=github&logoColor=white)](https://github.com/thegeeklab/drone-docker)
|
||||||
[![License: Apache-2.0](https://img.shields.io/github/license/thegeeklab/drone-docker)](https://github.com/thegeeklab/drone-docker/blob/main/LICENSE)
|
[![License: Apache-2.0](https://img.shields.io/github/license/thegeeklab/drone-docker)](https://github.com/thegeeklab/drone-docker/blob/main/LICENSE)
|
||||||
|
|
||||||
Drone plugin to build multiarch Docker images. This plugin is a fork of [drone-plugins/drone-docker](https://github.com/drone-plugins/drone-docker). You can find the full documentation at You can find the full documentation at [https://drone-plugin-index.geekdocs.de](https://drone-plugin-index.geekdocs.de/plugins/drone-docker).
|
Drone plugin to build multiarch Docker images. This plugin is a fork of [drone-plugins/drone-docker](https://github.com/drone-plugins/drone-docker). You can find the full documentation at [https://drone-plugin-index.geekdocs.de](https://drone-plugin-index.geekdocs.de/plugins/drone-docker).
|
||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
|
|
||||||
|
|
|
@ -46,10 +46,32 @@ steps:
|
||||||
|
|
||||||
<!-- prettier-ignore-start -->
|
<!-- prettier-ignore-start -->
|
||||||
<!-- spellchecker-disable -->
|
<!-- spellchecker-disable -->
|
||||||
{{< propertylist name=drone-docker.data >}}
|
{{< propertylist name=drone-docker.data sort=name >}}
|
||||||
<!-- spellchecker-enable -->
|
<!-- spellchecker-enable -->
|
||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
**Push to other registries than DockerHub:**
|
||||||
|
|
||||||
|
If the created image is to be pushed to registries other than the default DockerHub, it is necessary to set `registry` and `repo` as fully-qualified name.
|
||||||
|
|
||||||
|
```YAML
|
||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: docker
|
||||||
|
image: thegeeklab/drone-docker
|
||||||
|
privileged: true
|
||||||
|
settings:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: octocat
|
||||||
|
password: secret-access-token
|
||||||
|
repo: ghcr.io/octocat/example
|
||||||
|
tags: latest
|
||||||
|
```
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
Build the binary with the following command:
|
Build the binary with the following command:
|
||||||
|
|
|
@ -1,95 +1,95 @@
|
||||||
---
|
---
|
||||||
properties:
|
properties:
|
||||||
dry_run:
|
- name: dry_run
|
||||||
description: Disable docker push.
|
description: Disable docker push.
|
||||||
type: bool
|
type: bool
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
mirror:
|
- name: mirror
|
||||||
description: Use a registry mirror to pull images.
|
description: Use a registry mirror to pull images.
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
storage_driver:
|
- name: storage_driver
|
||||||
description: The docker daemon storage driver.
|
description: The docker daemon storage driver.
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
storage_path:
|
- name: storage_path
|
||||||
description: The docker daemon storage path.
|
description: The docker daemon storage path.
|
||||||
defaultValue: /var/lib/docker
|
defaultValue: /var/lib/docker
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
bip:
|
- name: bip
|
||||||
description: Allows the docker daemon to bride IP address.
|
description: Allows the docker daemon to bride IP address.
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
mtu:
|
- name: mtu
|
||||||
description: A docker daemon custom MTU.
|
description: A docker daemon custom MTU.
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
custom_dns:
|
- name: custom_dns
|
||||||
description: Custom docker daemon DNS server.
|
description: Custom docker daemon DNS server.
|
||||||
type: list
|
type: list
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
custom_dns_search:
|
- name: custom_dns_search
|
||||||
description: Custom docker daemon DNS search domain.
|
description: Custom docker daemon DNS search domain.
|
||||||
type: list
|
type: list
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
insecure:
|
- name: insecure
|
||||||
description: Enable the usage of insecure registries.
|
description: Enable the usage of insecure registries.
|
||||||
type: bool
|
type: bool
|
||||||
defaultValue: false
|
defaultValue: false
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
ipv6:
|
- name: ipv6
|
||||||
description: Enable docker daemon IPv6 support.
|
description: Enable docker daemon IPv6 support.
|
||||||
type: bool
|
type: bool
|
||||||
defaultValue: false
|
defaultValue: false
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
experimental:
|
- name: experimental
|
||||||
description: Enable docker daemon experimental mode.
|
description: Enable docker daemon experimental mode.
|
||||||
type: bool
|
type: bool
|
||||||
defaultValue: false
|
defaultValue: false
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
daemon_debug:
|
- name: daemon_debug
|
||||||
description: Enable verbose debug mode for the docker daemon.
|
description: Enable verbose debug mode for the docker daemon.
|
||||||
type: string
|
type: string
|
||||||
defaultValue: false
|
defaultValue: false
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
daemon_off:
|
- name: daemon_off
|
||||||
description: Disable the startup of the docker daemon.
|
description: Disable the startup of the docker daemon.
|
||||||
type: string
|
type: string
|
||||||
defaultValue: false
|
defaultValue: false
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
dockerfile:
|
- name: dockerfile
|
||||||
description: Set dockerfile to use for the image build.
|
description: Set dockerfile to use for the image build.
|
||||||
defaultValue: Dockerfile
|
defaultValue: Dockerfile
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
context:
|
- name: context
|
||||||
description: Set the path of the build context to use.
|
description: Set the path of the build context to use.
|
||||||
defaultValue: .
|
defaultValue: .
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
tags:
|
- name: tags
|
||||||
description: Set repository tags to use for the image. Tags can also be loaded from a `.tags` file.
|
description: Set repository tags to use for the image. Tags can also be loaded from a `.tags` file.
|
||||||
defaultValue: latest
|
defaultValue: latest
|
||||||
type: list
|
type: list
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
auto_tag:
|
- name: auto_tag
|
||||||
description: |
|
description: |
|
||||||
Generate tag names automatically based on git branch and git tag. When this feature is enabled and the event type is `tag`,
|
Generate tag names automatically based on git branch and git tag. When this feature is enabled and the event type is `tag`,
|
||||||
the plugin will automatically tag the image using the standard semVer convention. For example:
|
the plugin will automatically tag the image using the standard semVer convention. For example:
|
||||||
|
@ -103,93 +103,95 @@ properties:
|
||||||
type: bool
|
type: bool
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
auto_tag_suffix:
|
- name: auto_tag_suffix
|
||||||
description: Generate tag names with the given suffix.
|
description: Generate tag names with the given suffix.
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
build_args:
|
- name: build_args
|
||||||
description: Ccustom build arguments to pass to the build.
|
description: Ccustom build arguments to pass to the build.
|
||||||
type: list
|
type: list
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
build_args_from_env:
|
- name: build_args_from_env
|
||||||
description: Forward environment variables as custom arguments to the build.
|
description: Forward environment variables as custom arguments to the build.
|
||||||
type: list
|
type: list
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
quiet:
|
- name: quiet
|
||||||
description: Enable suppression of the build output.
|
description: Enable suppression of the build output.
|
||||||
defaultValue: false
|
defaultValue: false
|
||||||
type: bool
|
type: bool
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
target:
|
- name: target
|
||||||
description: The docker build target.
|
description: The docker build target.
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
cache_from:
|
- name: cache_from
|
||||||
description: Images to consider as cache sources.
|
description: Images to consider as cache sources.
|
||||||
type: list
|
type: list
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
pull_image:
|
- name: pull_image
|
||||||
description: Enforce to pull the base image at build time.
|
description: Enforce to pull the base image at build time.
|
||||||
defaultValue: true
|
defaultValue: true
|
||||||
type: bool
|
type: bool
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
compress:
|
- name: compress
|
||||||
description: Enable compression of the build context using gzip.
|
description: Enable compression of the build context using gzip.
|
||||||
defaultValue: false
|
defaultValue: false
|
||||||
type: bool
|
type: bool
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
repo:
|
- name: repo
|
||||||
description: Repository name for the image.
|
description: |
|
||||||
|
Repository name for the image. If the image is to be pushed to registries other than the default DockerHub,
|
||||||
|
it is necessary to set `repo` as fully-qualified name.
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
registry:
|
- name: registry
|
||||||
description: Docker registry to upload images.
|
description: Docker registry to upload images.
|
||||||
defaultValue: https://index.docker.io/v1/
|
defaultValue: https://index.docker.io/v1/
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
username:
|
- name: username
|
||||||
description: Username for authentication with the registry.
|
description: Username for authentication with the registry.
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
password:
|
- name: password
|
||||||
description: Password for authentication with the registry.
|
description: Password for authentication with the registry.
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
email:
|
- name: email
|
||||||
description: E-Mail address for authentication with the registry.
|
description: E-Mail address for authentication with the registry.
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
config:
|
- name: config
|
||||||
description: Content of the docker daemon json config.
|
description: Content of the docker daemon json config.
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
purge:
|
- name: purge
|
||||||
description: Enable cleanup of the docker environment at the end of a build.
|
description: Enable cleanup of the docker environment at the end of a build.
|
||||||
defaultValue: true
|
defaultValue: true
|
||||||
type: bool
|
type: bool
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
no_cache:
|
- name: no_cache
|
||||||
description: Disable the usage of cached intermediate containers.
|
description: Disable the usage of cached intermediate containers.
|
||||||
defaultValue: false
|
defaultValue: false
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
add_host:
|
- name: add_host
|
||||||
description: Additional `host:ip` mapping.
|
description: Additional `host:ip` mapping.
|
||||||
type: list
|
type: list
|
||||||
required: false
|
required: false
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM amd64/docker:19.03-dind@sha256:1875a3437d87a2fa8ec5e6fcd3233a98d571fa9692516b1e7d8eb18b7dca87a4
|
FROM amd64/docker:20.10-dind@sha256:56a2d342dd7f25fd604f71513f765526bd522f3c256bead83b6d30c5a8006fa6
|
||||||
|
|
||||||
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
||||||
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
FROM arm32v7/docker:19.03-dind@sha256:f998921d365053bf7e3f98794f6c23ca44e6809832d78105bc4d2da6bb8521ed
|
|
||||||
|
|
||||||
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
|
||||||
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
|
||||||
LABEL org.opencontainers.image.title="drone-docker"
|
|
||||||
LABEL org.opencontainers.image.url="https://github.com/thegeeklab/drone-docker"
|
|
||||||
LABEL org.opencontainers.image.source="https://github.com/thegeeklab/drone-docker"
|
|
||||||
LABEL org.opencontainers.image.documentation="https://github.com/thegeeklab/drone-docker"
|
|
||||||
|
|
||||||
ENV DOCKER_HOST=unix:///var/run/docker.sock
|
|
||||||
|
|
||||||
RUN apk --update add --virtual .build-deps curl && \
|
|
||||||
mkdir -p /etc/docker/ && \
|
|
||||||
curl -SsL -o /etc/docker/default.json https://raw.githubusercontent.com/moby/moby/19.03/profiles/seccomp/default.json && \
|
|
||||||
sed -i 's/SCMP_ACT_ERRNO/SCMP_ACT_TRACE/g' /etc/docker/default.json && \
|
|
||||||
chmod 600 /etc/docker/default.json && \
|
|
||||||
apk del .build-deps && \
|
|
||||||
rm -rf /var/cache/apk/* && \
|
|
||||||
rm -rf /tmp/*
|
|
||||||
|
|
||||||
ADD dist/drone-docker /bin/
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "drone-docker"]
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM arm64v8/docker:19.03-dind@sha256:81f35202223dcd33991fcb0e12d287f854dfb63b0b47e0c805ed87c0dfc4c9b3
|
FROM arm64v8/docker:20.10-dind@sha256:26c7da097331ba685a7314fcfc0eb608b86b4074bab5e1beaeb57d744c5c060a
|
||||||
|
|
||||||
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
||||||
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
||||||
|
|
|
@ -16,9 +16,3 @@ manifests:
|
||||||
architecture: arm64
|
architecture: arm64
|
||||||
os: linux
|
os: linux
|
||||||
variant: v8
|
variant: v8
|
||||||
|
|
||||||
- image: quay.io/thegeeklab/drone-docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm
|
|
||||||
platform:
|
|
||||||
architecture: arm
|
|
||||||
os: linux
|
|
||||||
variant: v7
|
|
||||||
|
|
|
@ -16,9 +16,3 @@ manifests:
|
||||||
architecture: arm64
|
architecture: arm64
|
||||||
os: linux
|
os: linux
|
||||||
variant: v8
|
variant: v8
|
||||||
|
|
||||||
- image: thegeeklab/drone-docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}arm
|
|
||||||
platform:
|
|
||||||
architecture: arm
|
|
||||||
os: linux
|
|
||||||
variant: v7
|
|
||||||
|
|
10
go.mod
10
go.mod
|
@ -1,19 +1,19 @@
|
||||||
module github.com/thegeeklab/drone-docker
|
module github.com/thegeeklab/drone-docker
|
||||||
|
|
||||||
go 1.18
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/coreos/go-semver v0.3.0
|
github.com/coreos/go-semver v0.3.0
|
||||||
github.com/joho/godotenv v1.4.0
|
github.com/joho/godotenv v1.4.0
|
||||||
github.com/sirupsen/logrus v1.8.1
|
github.com/sirupsen/logrus v1.9.0
|
||||||
github.com/thegeeklab/drone-plugin-lib/v2 v2.0.2
|
github.com/thegeeklab/drone-plugin-lib/v2 v2.2.1
|
||||||
github.com/urfave/cli/v2 v2.11.0
|
github.com/urfave/cli/v2 v2.23.7
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
|
||||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect
|
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
|
||||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
)
|
)
|
||||||
|
|
25
go.sum
25
go.sum
|
@ -2,6 +2,7 @@ github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmf
|
||||||
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
||||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||||
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
|
github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
|
||||||
|
@ -10,19 +11,21 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
|
||||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||||
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||||
github.com/thegeeklab/drone-plugin-lib/v2 v2.0.2 h1:RocBTXE5NuBlE7Toz8Vr/6naS7aPYRf3ZvJCPrAnwBA=
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/thegeeklab/drone-plugin-lib/v2 v2.0.2/go.mod h1:4i9SzCtb+xYx0N5TXoFMpXYdcSwjIAYbmc1jwA0MPME=
|
github.com/thegeeklab/drone-plugin-lib/v2 v2.2.1 h1:fta32M+y6aHG/BX+Kwxo9DQAcYpTyCBHn7sAm2qjfL0=
|
||||||
github.com/urfave/cli/v2 v2.11.0 h1:c6bD90aLd2iEsokxhxkY5Er0zA2V9fId2aJfwmrF+do=
|
github.com/thegeeklab/drone-plugin-lib/v2 v2.2.1/go.mod h1:Bu++VS6GXEWCHQdzR65dPsGtBGOMuqAQPiRVBaa+HrY=
|
||||||
github.com/urfave/cli/v2 v2.11.0/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo=
|
github.com/urfave/cli/v2 v2.23.7 h1:YHDQ46s3VghFHFf1DdF+Sh7H4RqhcM+t0TmZRJx4oJY=
|
||||||
|
github.com/urfave/cli/v2 v2.23.7/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
|
||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
|
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
|
||||||
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
|
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
|
||||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
|
||||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 h1:nonptSpoQ4vQjyraW20DXPAglgQfVnM9ZC6MmNLMR60=
|
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package plugin
|
package plugin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@ func (p Plugin) startDaemon() {
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
} else {
|
} else {
|
||||||
cmd.Stdout = ioutil.Discard
|
cmd.Stdout = io.Discard
|
||||||
cmd.Stderr = ioutil.Discard
|
cmd.Stderr = io.Discard
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
trace(cmd)
|
trace(cmd)
|
||||||
|
|
|
@ -2,7 +2,6 @@ package plugin
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
@ -129,7 +128,7 @@ func (p *Plugin) Execute() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
path := filepath.Join(dockerHome, "config.json")
|
path := filepath.Join(dockerHome, "config.json")
|
||||||
err := ioutil.WriteFile(path, []byte(p.settings.Login.Config), 0o600)
|
err := os.WriteFile(path, []byte(p.settings.Login.Config), 0o600)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error writing config.json: %s", err)
|
return fmt.Errorf("error writing config.json: %s", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user