August 2018
Intermediate to advanced
352 pages
12h 30m
English
First, ensure that the Docker daemon is running and has access to the gcc and scratch images. You should also ensure that you have a clone of https://github.com/docker-cookbook/scratch.git, and that the repository contains demo.c and a Dockerfile.
The content of demo.c should be as follows:
#include <stdio.h> void main() { printf("Statically built for demo\n"); }
The content of the Dockerfile should be as follows:
FROM scratchADD demo /CMD ["/demo"]
Read now
Unlock full access