标签:uil 技术分享 src 构建 http ext printf https ati
sudo gpasswd -a vagrant docker#include<stdio.h>
int main()
{
printf("hello docker\n");
}
编译c程序要先安装
yum install gcc
yum install glibc-static
gcc -static hello.c -o hello
./hello
vim Dockerfile
FROM scratch
ADD hello /
CMD ["/hello"]
docker build -t skinglzw/hello-world . 构建bese image 完成
标签:uil 技术分享 src 构建 http ext printf https ati
原文地址:http://blog.51cto.com/skinglzw/2342005