Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orisano/castage
castage is multi-stage builds helper for caching
https://github.com/orisano/castage
ci docker docker-build multi-stage-build
Last synced: 7 days ago
JSON representation
castage is multi-stage builds helper for caching
- Host: GitHub
- URL: https://github.com/orisano/castage
- Owner: orisano
- License: mit
- Created: 2018-10-28T13:13:00.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-02T11:53:16.000Z (8 months ago)
- Last Synced: 2024-04-02T13:15:40.147Z (8 months ago)
- Topics: ci, docker, docker-build, multi-stage-build
- Language: Go
- Homepage:
- Size: 150 KB
- Stars: 15
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - orisano/castage - castage is multi-stage builds helper for caching (Go)
README
# castage
castage is multi-stage builds helper for caching.## Installation
```bash
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 downloadFROM 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