Skip to content

castage is multi-stage builds helper for caching

License

Notifications You must be signed in to change notification settings

orisano/castage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

castage

castage is multi-stage builds helper for caching.

Installation

go get -u github.com/orisano/castage/...

How to use

$ cat Dockerfile
FROM golang:1.12-alpine3.9 AS vendor
WORKDIR /var/app/castage
RUN apk add --no-cache git
COPY go.sum go.mod ./
RUN go mod download

FROM golang:1.12-alpine3.9 AS builder

FROM alpine:3.9 AS app

$ castage -i image_name
set -ex
docker pull image_name:vendor-cache || true
docker build -t image_name:vendor-cache --target=vendor --cache-from=image_name:vendor-cache .
docker pull image_name:builder-cache || true
docker build -t image_name:builder-cache --target=builder --cache-from=image_name:vendor-cache,image_name:builder-cache .
docker pull image_name:app-cache || true
docker build -t image_name:app-cache --target=app --cache-from=image_name:vendor-cache,image_name:builder-cache,image_name:app-cache .

Author

Nao Yonashiro (@orisano)

License

MIT

About

castage is multi-stage builds helper for caching

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages