Skip to content

Commit

Permalink
Improve dockerfile (cadence-workflow#2980)
Browse files Browse the repository at this point in the history
  • Loading branch information
sagikazarmark authored and venkat1109 committed Jan 21, 2020
1 parent 9059a59 commit f9613b6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
build/
cadence
cadence-server
cadence-canary
cadence-sql-tool
cadence-cassandra-tool
vendor/
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG TARGET=server
ARG GOPROXY

# Build tcheck binary
FROM golang:1.13.3-alpine AS tcheck
FROM golang:1.13.6-alpine AS tcheck

RUN apk add --update --no-cache ca-certificates git curl

Expand All @@ -25,7 +25,7 @@ RUN go install


# Build Cadence binaries
FROM golang:1.13.3-alpine AS builder
FROM golang:1.13.6-alpine AS builder

RUN apk add --update --no-cache ca-certificates make git curl mercurial bzr

Expand All @@ -39,12 +39,12 @@ COPY go.* ./
RUN go mod download

COPY . .
# need to make clean first in case binaries to be built are stale
RUN make clean && CGO_ENABLED=0 make copyright cadence-cassandra-tool cadence-sql-tool cadence cadence-server

RUN CGO_ENABLED=0 make copyright cadence-cassandra-tool cadence-sql-tool cadence cadence-server


# Download dockerize
FROM alpine:3.10 AS dockerize
FROM alpine:3.11 AS dockerize

RUN apk add --no-cache openssl

Expand All @@ -55,8 +55,9 @@ RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSI
&& echo "**** fix for host id mapping error ****" \
&& chown root:root /usr/local/bin/dockerize


# Alpine base image
FROM alpine:3.10 AS alpine
FROM alpine:3.11 AS alpine

RUN apk add --update --no-cache ca-certificates tzdata bash curl

Expand Down

0 comments on commit f9613b6

Please sign in to comment.