Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
434ec873dd | ||
0c7c9334ef | |||
8aea07cf6e | |||
aaa5e4c85a | |||
eaa0980acd | |||
455a63aecc |
24
.drone.yml
24
.drone.yml
@ -4,21 +4,35 @@ type: docker
|
|||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build docker image
|
- name: build docker image (alpine)
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
environment:
|
environment:
|
||||||
DOCKER_BUILDKIT: '1'
|
DOCKER_BUILDKIT: '1'
|
||||||
settings:
|
settings:
|
||||||
purge: true
|
purge: true
|
||||||
repo: otakukaze/golang-base-image
|
repo: otakukaze/golang-base-image
|
||||||
tags:
|
|
||||||
- "${DRONE_BRANCH}"
|
|
||||||
username: otakukaze
|
username: otakukaze
|
||||||
password:
|
password:
|
||||||
from_secret: password
|
from_secret: password
|
||||||
build_args:
|
tags:
|
||||||
- "IMG_TAG=${DRONE_BRANCH}"
|
- "${DRONE_BRANCH}"
|
||||||
when:
|
when:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/1-alpine
|
- refs/heads/1-alpine
|
||||||
|
|
||||||
|
- name: build docker image (debian)
|
||||||
|
image: plugins/docker
|
||||||
|
environment:
|
||||||
|
DOCKER_BUILDKIT: '1'
|
||||||
|
settings:
|
||||||
|
purge: true
|
||||||
|
repo: otakukaze/golang-base-image
|
||||||
|
username: otakukaze
|
||||||
|
password:
|
||||||
|
from_secret: password
|
||||||
|
tags:
|
||||||
|
- "1"
|
||||||
|
- "latest"
|
||||||
|
when:
|
||||||
|
ref:
|
||||||
|
- refs/heads/master
|
||||||
|
14
Dockerfile
14
Dockerfile
@ -1,5 +1,11 @@
|
|||||||
ARG IMG_TAG=1-alpine
|
ARG IMG_TAG=1
|
||||||
|
FROM golang:${IMG_TAG} as builder
|
||||||
|
RUN go get -u -v github.com/go-bindata/go-bindata/... \
|
||||||
|
&& dir=$(mktemp -d) \
|
||||||
|
&& git clone https://github.com/go-swagger/go-swagger "$dir" \
|
||||||
|
&& cd "$dir" \
|
||||||
|
&& go install ./cmd/swagger
|
||||||
|
|
||||||
FROM golang:${IMG_TAG}
|
FROM golang:${IMG_TAG}
|
||||||
RUN apk add --no-cache git make gcc libc-dev \
|
COPY --from=builder /go/bin/swagger /usr/bin
|
||||||
&& go get -u github.com/go-bindata/go-bindata/... \
|
COPY --from=builder /go/bin/go-bindata /usr/bin
|
||||||
&& go get -u github.com/go-swagger/go-swagger/...
|
|
||||||
|
Loading…
Reference in New Issue
Block a user