Skip to content
This repository was archived by the owner on Jan 23, 2022. It is now read-only.

Commit 012c88c

Browse files
committed
Fix dockerfiles
1 parent 00957bb commit 012c88c

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dor-http.Dockerfile
2+
dor-insert.Dockerfile
3+
docker-compose.yml
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ FROM golang:alpine AS build-env
22
LABEL maintainer "Ilya Glotov <ilya@ilyaglotov.com>" \
33
repository "https://github.com/ilyaglow/dor"
44

5-
ENV CGO_ENABLED 0
5+
ENV CGO_ENABLED=0 \
6+
GO111MODULE=on
67

7-
COPY dor.go /go/src/dor/dor.go
8+
COPY . /go/src/dor
89

910
RUN apk -U --no-cache add git \
1011
&& cd /go/src/dor \
11-
&& go get -v . \
12-
&& go build -ldflags="-s -w" -o /dor \
12+
&& go build -ldflags="-s -w" -o /dor service/dor-http/dor.go \
1313
&& apk del git
1414

1515
FROM alpine:edge
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ FROM golang:alpine AS build-env
22
LABEL maintainer "Ilya Glotov <ilya@ilyaglotov.com>" \
33
repository "https://github.com/ilyaglow/dor"
44

5-
ENV CGO_ENABLED 0
5+
ENV CGO_ENABLED=0 \
6+
GO111MODULE=on
67

7-
COPY dor-insert.go /go/src/dor-insert/dor-insert.go
8+
COPY . /go/src/dor
89

910
RUN apk -U --no-cache add git \
10-
&& cd /go/src/dor-insert \
11-
&& go get -v . \
12-
&& go build -ldflags="-s -w" -o /dor-insert \
11+
&& cd /go/src/dor \
12+
&& go build -ldflags="-s -w" -o /dor-insert cmd/dor-insert/dor-insert.go \
1313
&& apk del git
1414

1515
FROM alpine:edge

0 commit comments

Comments
 (0)