https://github.com/lorenz/dockpipe
A docker build pipeline with subcontainers
https://github.com/lorenz/dockpipe
Last synced: about 2 months ago
JSON representation
A docker build pipeline with subcontainers
- Host: GitHub
- URL: https://github.com/lorenz/dockpipe
- Owner: lorenz
- License: mit
- Created: 2015-11-17T14:07:53.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-22T14:12:39.000Z (about 9 years ago)
- Last Synced: 2026-01-01T14:36:35.307Z (6 months ago)
- Language: Shell
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dockpipe
*A docker build pipeline with subcontainers*
**IMPORTANT: Please use the new Docker Multistage builds (https://docs.docker.com/engine/userguide/eng-image/multistage-build/#use-multi-stage-builds) instead of this, they are better integrated into Docker than Dockpipe could ever be.**
## Example
```
# Base image for the resulting image
FROM ubuntu:14.04
# Build a Rust project using a base image with a Rust compiler
SUB schickling/rust
ADD api /source
RUN cargo build --release
RETURN /source/target/release/api /app/server
# Compile and minify a frontend project with Node
SUB node:5
WORKDIR /source
ADD package.json /source/package.json
RUN npm install
ADD . /source
RUN npm run build
RETURN /source/dist /app/dist
# Command to start the server
CMD ["/app/server"]
```
## Dockerfile extensions
Dockpipe adds two commands to Dockerfiles: `SUB` and `RETURN`. The syntax is:
`SUB image_name:tag`
`RETURN /path/in/sub_container /path/in/parent_container`
The first one starts a new subcontainer, the second one ends one and returns data to its parent.
## Command syntax
`./dockpipe.sh TAG DIRECTORY`
Dockpipe pushes the resulting image to a registry if the tag contains one. This facilitates usage when using Dockpipe in a CI.
## Project status
The current version of Dockpipe is written in Bash and therefore relatively unstable. I'm working on a Rust version but that'll take some time because there is currently no good Docker client for Rust.