8
Jun

Docker

   Posted by: admin   in Mẹo vặt của hiếu râu

#yum install epel-release
#yum install docker-io
#docker search centos
#docker pull centos
#docker images
# docker run -tid –name centos centos
# docker ps -all
#docker exec -ti centos bash

#mkdir /netconf; cd /netconf
#vi Dockerfile

FROM centos

ENV http_proxy http://10.99.0.232:3128

ENV https_proxy http://10.99.0.232:3128

RUN yum -y update

RUN yum -y install httpd mc telnet net-tools less

RUN yum -y install epel-release

RUN rpm -ivh http://rpms.remirepo.net/enterprise/remi-release-7.rpm

RUN yum-config-manager –enable remi-php70

RUN yum -y install php php-pdo php-dom php-devel

EXPOSE 80

CMD /usr/sbin/apachectl -DFOREGROUND

#docker build -t netconf .

# docker run -tid -v /netconf/html:/var/www/html -p 80:80 –cap-add SYS_ADMIN –name netconf netconf

#docker exec -ti netconf bash
#docker stop netconf
#docker rm netconf
#docker rmi netconf

#docker export -o /path/to/file containername

#cat /path/to/file | docker import - imagename

This entry was posted on Friday, June 8th, 2018 at 11:19 am and is filed under Mẹo vặt của hiếu râu. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed at this time.