Add Dockerfile
This commit is contained in:
parent
4203f6e26b
commit
7de1404f4d
13
.drone.yml
13
.drone.yml
@ -15,3 +15,16 @@ steps:
|
|||||||
- go generate -v
|
- go generate -v
|
||||||
- go get -v -d
|
- go get -v -d
|
||||||
- go build -v -o chldapasswd
|
- go build -v -o chldapasswd
|
||||||
|
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
repo: nemunaire/chldapasswd
|
||||||
|
tags: latest
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
FROM golang:latest as gobuild
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y build-essential git go-bindata
|
||||||
|
|
||||||
|
WORKDIR /go/src/git.nemunai.re/chldapasswd
|
||||||
|
|
||||||
|
ADD . .
|
||||||
|
|
||||||
|
RUN go generate -v
|
||||||
|
RUN go get -d -v
|
||||||
|
RUN go build -v
|
||||||
|
|
||||||
|
|
||||||
|
FROM debian:stable-slim
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install -y ca-certificates && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
WORKDIR /srv
|
||||||
|
|
||||||
|
ENTRYPOINT ["/srv/chldapasswd", "-bind=:8080"]
|
||||||
|
|
||||||
|
COPY --from=gobuild /go/src/git.nemunai.re/chldapasswd/chldapasswd /srv/chldapasswd
|
Loading…
Reference in New Issue
Block a user