From 243a2d08370f35c2aced72e1efcd2e1c82349460 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Wed, 27 Sep 2017 19:01:52 -0700 Subject: [PATCH 1/2] add alpine images --- .drone.yml | 23 +++++++++++++++++++++-- Dockerfile.agent | 2 +- Dockerfile.agent.alpine | 12 ++++++++++++ Dockerfile.agent.linux.arm | 2 +- Dockerfile.agent.linux.arm64 | 2 +- Dockerfile.alpine | 13 +++++++++++++ version/version.go | 2 +- 7 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 Dockerfile.agent.alpine create mode 100644 Dockerfile.alpine diff --git a/.drone.yml b/.drone.yml index 29d3215bc..2c1bc0603 100644 --- a/.drone.yml +++ b/.drone.yml @@ -37,6 +37,15 @@ pipeline: when: event: [ push, tag ] + publish_server_alpine: + image: plugins/docker + repo: drone/drone + secrets: [ docker_username, docker_password ] + tag: [ alpine ] + when: + branch: master + event: push + publish_server: image: plugins/docker repo: drone/drone @@ -46,6 +55,16 @@ pipeline: branch: master event: push + publish_agent_alpine: + image: plugins/docker + repo: drone/agent + dockerfile: Dockerfile.agent.alpine + secrets: [ docker_username, docker_password ] + tag: [ alpine ] + when: + branch: master + event: push + publish_agent_arm: image: plugins/docker repo: drone/agent @@ -80,7 +99,7 @@ pipeline: image: plugins/docker repo: drone/drone secrets: [ docker_username, docker_password ] - tag: [ 0.8, 0.8.0 ] + tag: [ 0.8, 0.8.1 ] when: event: tag @@ -89,7 +108,7 @@ pipeline: repo: drone/agent dockerfile: Dockerfile.agent secrets: [ docker_username, docker_password ] - tag: [ 0.8, 0.8.0 ] + tag: [ 0.8, 0.8.1 ] when: event: tag diff --git a/Dockerfile.agent b/Dockerfile.agent index 5c4c752bc..d5f5feb56 100644 --- a/Dockerfile.agent +++ b/Dockerfile.agent @@ -1,6 +1,6 @@ # docker build --rm -f Dockerfile.agent -t drone/agent . -FROM centurylink/ca-certs +FROM drone/ca-certs ENV GODEBUG=netdns=go ADD release/drone-agent /bin/ diff --git a/Dockerfile.agent.alpine b/Dockerfile.agent.alpine new file mode 100644 index 000000000..36417d306 --- /dev/null +++ b/Dockerfile.agent.alpine @@ -0,0 +1,12 @@ +FROM alpine:3.6 + +RUN apk add -U --no-cache ca-certificates && rm -rf /var/cache/apk/* + +ENV GODEBUG=netdns=go +ADD release/drone-agent /bin/ + +EXPOSE 3000 +HEALTHCHECK CMD ["/bin/drone-agent", "ping"] + +ENTRYPOINT ["/bin/drone-agent"] + diff --git a/Dockerfile.agent.linux.arm b/Dockerfile.agent.linux.arm index f045a201b..ca5ea0253 100644 --- a/Dockerfile.agent.linux.arm +++ b/Dockerfile.agent.linux.arm @@ -1,4 +1,4 @@ -FROM centurylink/ca-certs +FROM drone/ca-certs ENV GODEBUG=netdns=go ENV DRONE_PLATFORM=linux/arm ADD release/linux/arm/drone-agent /bin/ diff --git a/Dockerfile.agent.linux.arm64 b/Dockerfile.agent.linux.arm64 index 332014daa..0c4371970 100644 --- a/Dockerfile.agent.linux.arm64 +++ b/Dockerfile.agent.linux.arm64 @@ -1,4 +1,4 @@ -FROM centurylink/ca-certs +FROM drone/ca-certs ENV GODEBUG=netdns=go ENV DRONE_PLATFORM=linux/arm64 ADD release/linux/arm64/drone-agent /bin/ diff --git a/Dockerfile.alpine b/Dockerfile.alpine new file mode 100644 index 000000000..72cb5ed71 --- /dev/null +++ b/Dockerfile.alpine @@ -0,0 +1,13 @@ +FROM alpine:3.6 +EXPOSE 8000 9000 80 443 + +RUN apk add -U --no-cache ca-certificates && rm -rf /var/cache/apk/* + +ENV DATABASE_DRIVER=sqlite3 +ENV DATABASE_CONFIG=/var/lib/drone/drone.sqlite +ENV GODEBUG=netdns=go +ENV XDG_CACHE_HOME /var/lib/drone + +ADD release/drone-server /bin/ + +ENTRYPOINT ["/bin/drone-server"] diff --git a/version/version.go b/version/version.go index 1cf538f55..52cf42360 100644 --- a/version/version.go +++ b/version/version.go @@ -8,7 +8,7 @@ var ( // VersionMinor is for functionality in a backwards-compatible manner. VersionMinor int64 = 8 // VersionPatch is for backwards-compatible bug fixes. - VersionPatch int64 = 0 + VersionPatch int64 = 1 // VersionPre indicates prerelease. VersionPre string // VersionDev indicates development branch. Releases will be empty string. From ca8a00ecd589f08da91e87cf7d83f8fc6858809b Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Wed, 27 Sep 2017 19:04:58 -0700 Subject: [PATCH 2/2] remove deletion since we have --no-cache --- Dockerfile.agent.alpine | 2 +- Dockerfile.alpine | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.agent.alpine b/Dockerfile.agent.alpine index 36417d306..a2bb3ce29 100644 --- a/Dockerfile.agent.alpine +++ b/Dockerfile.agent.alpine @@ -1,6 +1,6 @@ FROM alpine:3.6 -RUN apk add -U --no-cache ca-certificates && rm -rf /var/cache/apk/* +RUN apk add -U --no-cache ca-certificates ENV GODEBUG=netdns=go ADD release/drone-agent /bin/ diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 72cb5ed71..a22797c86 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -1,7 +1,7 @@ FROM alpine:3.6 EXPOSE 8000 9000 80 443 -RUN apk add -U --no-cache ca-certificates && rm -rf /var/cache/apk/* +RUN apk add -U --no-cache ca-certificates ENV DATABASE_DRIVER=sqlite3 ENV DATABASE_CONFIG=/var/lib/drone/drone.sqlite