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
|
||||
|
||||
steps:
|
||||
- name: build docker image
|
||||
- name: build docker image (alpine)
|
||||
image: plugins/docker
|
||||
environment:
|
||||
DOCKER_BUILDKIT: '1'
|
||||
settings:
|
||||
purge: true
|
||||
repo: otakukaze/golang-base-image
|
||||
tags:
|
||||
- "${DRONE_BRANCH}"
|
||||
username: otakukaze
|
||||
password:
|
||||
from_secret: password
|
||||
build_args:
|
||||
- "IMG_TAG=${DRONE_BRANCH}"
|
||||
tags:
|
||||
- "${DRONE_BRANCH}"
|
||||
when:
|
||||
ref:
|
||||
- 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}
|
||||
RUN apk add --no-cache git make gcc libc-dev \
|
||||
&& go get -u github.com/go-bindata/go-bindata/... \
|
||||
&& go get -u github.com/go-swagger/go-swagger/...
|
||||
COPY --from=builder /go/bin/swagger /usr/bin
|
||||
COPY --from=builder /go/bin/go-bindata /usr/bin
|
||||
|
Loading…
Reference in New Issue
Block a user