12 Commits

Author SHA1 Message Date
Don
e0a0d2791f Add dockerfile 2022-09-30 15:03:29 -07:00
Don
0ea1ad3bd9 Fix 2022-09-30 14:47:18 -07:00
Don
dcc34d8341 Add image 2022-09-30 14:33:18 -07:00
Don
5adfaf4742 Make a ltsc2022 docker build 2022-09-30 14:31:31 -07:00
TP Honey
d0e7d7f01b Merge pull request #373 from donny-dont/docker-card-windows
Use full path to docker when creating card
2022-09-15 10:02:11 +01:00
Don
eb53fd1f17 Use full path to docker when creating card
Windows docker builds failed to create the card using `docker inspect` because docker isn't on the path. Instead use `dockerExec` from `daemon.go` which has the full path to the executable.
2022-09-14 09:46:21 -07:00
TP Honey
a842dfe557 (maint) add secrets docs 2022-07-04 13:24:26 +01:00
TP Honey
571deb95bf Merge pull request #367 from tphoney/prep-v20.13.0
v20.13.0 prep
2022-06-08 16:52:56 +01:00
TP Honey
69c2651508 v20.13.0 prep 2022-06-08 16:28:12 +01:00
TP Honey
45f66fdee2 Merge pull request #365 from tphoney/patch-1 2022-06-06 13:42:02 +01:00
TP Honey
bdefe42719 (feat) update arm64 base image, and add some dev notes to the readme 2022-05-31 16:52:58 +01:00
vdovinmih
2b540a68ac Update Dockerfile.linux.amd64
Bump version to 20.10.14
2022-05-31 16:52:55 +01:00
8 changed files with 112 additions and 1397 deletions

1410
.drone.yml

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,14 @@
# Changelog
## [v20.12.0](https://github.com/drone-plugins/drone-docker/tree/v20.12.0) (2022-05-12)
## [v20.13.0](https://github.com/drone-plugins/drone-docker/tree/v20.13.0) (2022-06-08)
[Full Changelog](https://github.com/drone-plugins/drone-docker/compare/v20.12.0...v20.13.0)
**Implemented enhancements:**
- update docker linux amd64/arm64 to 20.10.14 [\#365](https://github.com/drone-plugins/drone-docker/pull/365) ([tphoney](https://github.com/tphoney))
## [v20.12.0](https://github.com/drone-plugins/drone-docker/tree/v20.12.0) (2022-05-16)
[Full Changelog](https://github.com/drone-plugins/drone-docker/compare/v20.11.0...v20.12.0)
@@ -14,6 +22,10 @@
- \(fix\) Update card.json with UX [\#355](https://github.com/drone-plugins/drone-docker/pull/355) ([tphoney](https://github.com/tphoney))
**Merged pull requests:**
- prep for v20.12.0 [\#363](https://github.com/drone-plugins/drone-docker/pull/363) ([tphoney](https://github.com/tphoney))
## [v20.11.0](https://github.com/drone-plugins/drone-docker/tree/v20.11.0) (2022-01-19)
[Full Changelog](https://github.com/drone-plugins/drone-docker/compare/v20.10.9.1...v20.11.0)

View File

@@ -62,6 +62,46 @@ docker build \
> Notice: Be aware that the Docker plugin currently requires privileged capabilities, otherwise the integrated Docker daemon is not able to start.
### Using Docker buildkit Secrets
```yaml
kind: pipeline
name: default
steps:
- name: build dummy docker file and publish
image: plugins/docker
pull: never
settings:
repo: tphoney/test
tags: latest
secret: id=mysecret,src=secret-file
username:
from_secret: docker_username
password:
from_secret: docker_password
```
Using a dockerfile that references the secret-file
```bash
# syntax=docker/dockerfile:1.2
FROM alpine
# shows secret from default secret location:
RUN --mount=type=secret,id=mysecret cat /run/secrets/mysecret
```
and a secret file called secret-file
```
COOL BANANAS
```
### Running from the CLI
```console
docker run --rm \
-e PLUGIN_TAG=latest \
@@ -73,6 +113,11 @@ docker run --rm \
plugins/docker --dry-run
```
## Developer Notes
- When updating the base image, you will need to update for each architecture and OS.
- Arm32 base images are no longer being updated.
## Release procedure
Run the changelog generator.
@@ -91,4 +136,4 @@ Run the changelog generator again with the future version according to semver.
docker run -it --rm -v "$(pwd)":/usr/local/src/your-app githubchangeloggenerator/github-changelog-generator -u drone-plugins -p drone-docker -t <secret token> --future-release v1.0.0
```
Create your pull request for the release. Get it merged then tag the release.
Create your pull request for the release. Get it merged then tag the release.

View File

@@ -18,7 +18,7 @@ import (
)
func (p Plugin) writeCard() error {
cmd := exec.Command("docker", "inspect", p.Build.Name)
cmd := exec.Command(dockerExe, "inspect", p.Build.Name)
data, err := cmd.CombinedOutput()
if err != nil {
return err

View File

@@ -1,4 +1,4 @@
FROM docker:20.10.9-dind
FROM docker:20.10.14-dind
ENV DOCKER_HOST=unix:///var/run/docker.sock

View File

@@ -1,4 +1,4 @@
FROM arm64v8/docker:20.10.9-dind
FROM arm64v8/docker:20.10.14-dind
ENV DOCKER_HOST=unix:///var/run/docker.sock

View File

@@ -0,0 +1,28 @@
# escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2022 as download
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV DOCKER_VERSION 19.03.1
RUN Invoke-WebRequest 'http://constexpr.org/innoextract/files/innoextract-1.7-windows.zip' -OutFile 'innoextract.zip' -UseBasicParsing ; `
Expand-Archive innoextract.zip -DestinationPath C:\ ; `
Remove-Item -Path innoextract.zip
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; `
Invoke-WebRequest $('https://github.com/docker/toolbox/releases/download/v{0}/DockerToolbox-{0}.exe' -f $env:DOCKER_VERSION) -OutFile 'dockertoolbox.exe' -UseBasicParsing
RUN /innoextract.exe dockertoolbox.exe
FROM mcr.microsoft.com/windows/nanoserver:ltsc2022
USER ContainerAdministrator
LABEL maintainer="Drone.IO Community <drone-dev@googlegroups.com>" `
org.label-schema.name="Drone Docker" `
org.label-schema.vendor="Drone.IO Community" `
org.label-schema.schema-version="1.0"
RUN mkdir C:\bin
COPY --from=download /windows/system32/netapi32.dll /windows/system32/netapi32.dll
COPY --from=download /app/docker.exe C:/bin/docker.exe
ADD release/windows/amd64/drone-docker.exe C:/bin/drone-docker.exe
ENTRYPOINT [ "C:\\bin\\drone-docker.exe" ]

View File

@@ -20,8 +20,8 @@ echo $env:VERSION
echo $env:REGISTRY
# build the binary
Write-Host "+ go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}";
go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}
#Write-Host "+ go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}";
#go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}
# build and publish the docker image
docker login -u ${env:USERNAME} -p ${env:PASSWORD}