Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6276e01435 |
24
.drone.yml
24
.drone.yml
@ -4,35 +4,21 @@ type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build docker image (alpine)
|
||||
- name: build docker image
|
||||
image: plugins/docker
|
||||
environment:
|
||||
DOCKER_BUILDKIT: '1'
|
||||
settings:
|
||||
purge: true
|
||||
repo: otakukaze/golang-base-image
|
||||
tags:
|
||||
- "${DRONE_BRANCH}"
|
||||
username: otakukaze
|
||||
password:
|
||||
from_secret: password
|
||||
tags:
|
||||
- "${DRONE_BRANCH}"
|
||||
build_args:
|
||||
- "IMG_TAG=${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,11 +1,5 @@
|
||||
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
|
||||
|
||||
ARG IMG_TAG=1-alpine
|
||||
FROM golang:${IMG_TAG}
|
||||
COPY --from=builder /go/bin/swagger /usr/bin
|
||||
COPY --from=builder /go/bin/go-bindata /usr/bin
|
||||
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/...
|
||||
|
Loading…
Reference in New Issue
Block a user