Skip to content

Commit

Permalink
Makes docker build faster. (supabase#267)
Browse files Browse the repository at this point in the history
* Makes docker build faster.

The new dockerfile first pulls the dependecies and in the next step 
builds the binary.

* Reduces number of build layers.
  • Loading branch information
hydroid7 authored Nov 23, 2020
1 parent 0d04d63 commit 4ee3b0e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ ENV GOOS=linux
RUN apk add --no-cache make git

WORKDIR /go/src/github.com/netlify/gotrue
COPY . /go/src/github.com/netlify/gotrue

RUN make deps build
# Pulling dependencies
COPY ./Makefile ./go.* ./
RUN make deps

# Building stuff
COPY . /go/src/github.com/netlify/gotrue
RUN make build

FROM alpine:3.7
RUN adduser -D -u 1000 netlify
Expand Down

0 comments on commit 4ee3b0e

Please sign in to comment.