Skip to content

Commit

Permalink
Dockerfile: improve apt-get
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgooz committed Aug 23, 2018
1 parent facc4ed commit 33a1d78
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
FROM golang:1.10.3-stretch AS build
WORKDIR src/github.com/mesg-foundation/core
COPY . .

ARG version
RUN go build -o mesg-core \
-ldflags="-X 'github.com/mesg-foundation/core/version.Version=$version'" \
core/main.go

FROM ubuntu:18.04
RUN apt-get update && apt-get install -y ca-certificates
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates=20180409 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /go/src/github.com/mesg-foundation/core/mesg-core .
CMD ["./mesg-core"]

0 comments on commit 33a1d78

Please sign in to comment.