forked from Ivasoft/drone-docker
Compare commits
7 Commits
v20.13.0
...
chicken-eg
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0a0d2791f | ||
|
|
0ea1ad3bd9 | ||
|
|
dcc34d8341 | ||
|
|
5adfaf4742 | ||
|
|
d0e7d7f01b | ||
|
|
eb53fd1f17 | ||
|
|
a842dfe557 |
1410
.drone.yml
1410
.drone.yml
File diff suppressed because it is too large
Load Diff
42
README.md
42
README.md
@@ -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.
|
> 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
|
```console
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-e PLUGIN_TAG=latest \
|
-e PLUGIN_TAG=latest \
|
||||||
@@ -96,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
|
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.
|
||||||
|
|||||||
2
card.go
2
card.go
@@ -18,7 +18,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (p Plugin) writeCard() error {
|
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()
|
data, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
28
docker/docker/Dockerfile.windows.amd64.ltsc2022
Normal file
28
docker/docker/Dockerfile.windows.amd64.ltsc2022
Normal 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" ]
|
||||||
@@ -20,8 +20,8 @@ echo $env:VERSION
|
|||||||
echo $env:REGISTRY
|
echo $env:REGISTRY
|
||||||
|
|
||||||
# build the binary
|
# build the binary
|
||||||
Write-Host "+ 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}
|
#go build -o release/windows/amd64/drone-${env:REGISTRY}.exe ./cmd/drone-${env:REGISTRY}
|
||||||
|
|
||||||
# build and publish the docker image
|
# build and publish the docker image
|
||||||
docker login -u ${env:USERNAME} -p ${env:PASSWORD}
|
docker login -u ${env:USERNAME} -p ${env:PASSWORD}
|
||||||
|
|||||||
Reference in New Issue
Block a user