Reduce docker image compile time

pull/3/head
Aloïs Micard 4 years ago
parent 680eccef96
commit 2f720961de
No known key found for this signature in database
GPG Key ID: 1A0EB82F071F5EFE

@ -5,6 +5,11 @@ RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
WORKDIR /app
# Copy and download dependencies to cache them and faster build time
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# Test then build app

@ -5,6 +5,11 @@ RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
WORKDIR /app
# Copy and download dependencies to cache them and faster build time
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# Test then build app

@ -5,6 +5,11 @@ RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
WORKDIR /app
# Copy and download dependencies to cache them and faster build time
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# Test then build app

@ -5,6 +5,11 @@ RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
WORKDIR /app
# Copy and download dependencies to cache them and faster build time
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# Test then build app

@ -5,6 +5,11 @@ RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
WORKDIR /app
# Copy and download dependencies to cache them and faster build time
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# Test then build app

@ -1,5 +1,6 @@
#!/bin/bash
# build processes
docker build . -f build/Dockerfile-crawler -t trandoshan.io/crawler
docker build . -f build/Dockerfile-feeder -t trandoshan.io/feeder
docker build . -f build/Dockerfile-scheduler -t trandoshan.io/scheduler

Loading…
Cancel
Save