Skip to content

Instantly share code, notes, and snippets.

Last active May 6, 2019
What would you like to do?

100kB Docker Image

FROM alpine:latest as builder
WORKDIR /build
RUN apk update && \
apk add gcc make libc-dev
COPY . ./
RUN make
FROM scratch
COPY --from=builder /build/hello .
CMD ["/hello"]
#include <stdio.h>
int main(void){
puts("Hello World\n");
hello: hello.c
gcc -o $@ $< -static
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment