docker 自定义image
1、编写一个二进制的文件: hello.c #include int main() { printf(hello world\n); } 2、检查环境中是否已安装了 gcc和glibc-static(用于编译C语言程序) history | grep yum 没有的话,则安装 yum install gcc yum install glibc-static 3、编译hello.c文件 gcc -static hello.c -o hello 4、检查当前目录的文件 [root@localhost hello-world]# ls hello hello.c
下载地址
用户评论