Skip to content

Commit 71d23cb

Browse files
committed
fix dockerfile and compose
1 parent 92a546c commit 71d23cb

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Dockerfile

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
FROM golang:alpine
1+
FROM golang:1.12-alpine as builder
2+
RUN apk add --no-cache git
3+
WORKDIR /vim-bootstrap
4+
COPY go.mod .
5+
COPY go.sum .
6+
RUN go mod download
7+
COPY ./ /vim-bootstrap
8+
RUN go build -ldflags "-s -w"
9+
10+
FROM alpine:3.9
211
LABEL mantainer="[email protected]"
312
LABEL mantainer="[email protected]"
4-
5-
RUN apk --no-cache add git
6-
WORKDIR /go/src/github.com/avelino/vim-bootstrap
7-
COPY . /go/src/github.com/avelino/vim-bootstrap
8-
9-
# Go dep!
10-
RUN go get -u github.com/golang/dep/...
11-
RUN dep ensure
12-
13-
RUN go install
14-
CMD ["vim-bootstrap", "-server"]
13+
RUN apk add --no-cache ca-certificates git
14+
WORKDIR /vim-bootstrap/
15+
COPY --from=builder /vim-bootstrap/vim-bootstrap vimbootstrap
16+
CMD ["./vimbootstrap", "-server"]

docker-compose.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
version: "2"
1+
version: "3"
22

33
services:
44
caddy:
55
image: abiosoft/caddy
66
volumes:
77
- ./Caddyfile:/etc/Caddyfile
88
- ./template/assets:/srv/assets
9-
links:
10-
- go:go
119
ports:
1210
- 80:2015
1311
go:
1412
build: ./
1513
ports:
16-
- 3000:3000
14+
- 3000:3000

0 commit comments

Comments
 (0)