Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 756 Bytes

File metadata and controls

28 lines (17 loc) · 756 Bytes

Docker Script

Pitch

Dockerfiles are universal scripts, but what if you just want the build artifact and are not interested in the container? This project enables that workflow!

Install

Clone this repository and copy 'docker-script' to your preferred $PATH.

Quickstart

Take any Dockerfile, and add label docker-script.export with path to what you want exported from the image, for example

FROM ubuntu:latest

RUN apt update -y
RUN apt install -y sudo build-essential

WORKDIR /root
ADD main.c .
RUN gcc main.c

LABEL docker-script.export="/root/a.out"

Running docker-script in this directory will build the Dockerfile, the app, and automatically extracts the compiled program! Which will be available in $PWD/a.out.