Skip to content

Instantly share code, notes, and snippets.

@tonymet tonymet/.dockerignore Secret
Last active May 6, 2019

Embed
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
WORKDIR /
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
You can’t perform that action at this time.