Dockerfile gcc-centos7

一、添加docker加速镜像源:

https://www.cnblogs.com/hackyo/p/9613465.html

二、编写dockerfile

shell> cd /opt
shell> mkdir centos
shell> cd centos
shell> touch Dockerfile

填写以下内容

FROM centos:centos7
RUN yum -y install gcc gcc-c++ kernel-devel &&\yum clean all && rm -rf /var/cache/yum \

三、执行dockerfile

docker build -t centos-gcc:v1 ./
发布了1 篇原创文章 · 获赞 0 · 访问量 13

猜你喜欢

转载自blog.csdn.net/weixin_38850930/article/details/104313169