1. Use mysql:5.6 and owncloud image to build a personal network disk.
2. Install and build the private warehouse Harbor
3. Write a Dockerfile to make a web application system nginx image, generate the image nginx:v1.1, and push it to the private warehouse. The specific requirements are as follows:
(1) Based on the centos base image;
(2) Specify the author information;
(3) Install the nginx service, transfer the provided dest directory (provide the default homepage index.html) to the image, and transfer the dest directory in the Copy the front-end files to the working directory of nginx;
(4) expose port 80;
(5) set the service to start automatically.
(6) Verify the image.
4. The Dockerfile quickly builds its own exclusive LAMP environment, generates the image lamp:v1.1, and pushes it to the private warehouse. The specific requirements are as follows:
(1) Based on the centos:7 base image;
(2) Specify author information;
(3) Install httpd, mariadb-server, php, php-mysql, php-gd;
(4) Expose ports 80 and 3306;
(5) Set the service to start automatically.
(6) Verify the image.
1. Use mysql:5.6 and owncloud image to build a personal network disk.
Pull the image.
docker pull mysql:5.6
docker pull owncloud
Use the image to build a personal network disk
Login
2. Install and build a private warehouse Harbor
Download Harbor
wget -c https://github.com/goharbor/harbor/releases/download/v2.0.2/harbor-offline- installer-v2.0.2.tgz
Apply executable permissions to the binary:
chmod +x /usr/local/bin/docker-compose
Test whether the installation is successful
docker-compose --version
Configure Harbor service
tar xf harbor-offline-installer-v2.0.2.tgz -C /usr/local
cd /usr/local/harbor/
cp harbor.yml.tmpl harbor.yml
vim harbor.yml
如下图:
保留修改hostname
保留http端口
run the install script
./install.sh
After installation verify
some ports are open
ss -nutlp |grep docker
Web page login: http://ip
default user password: admin/Harbor12345
3. Write a Dockerfile to make a web application system nginx image, generate an image nginx:v1.1, and push it to a private warehouse. Specific requirements are as follows:
( 1) Based on the centos base image;
(2) Specify the author information;
(3) Install the nginx service, transfer the provided dest directory (provide the default home page index.html) to the mirror, and copy the front-end files in the dest directory to The working directory of nginx;
(4) Expose port 80;
(5) Set the service to start automatically.
(6) Verify the image.
4. Dockerfile quickly builds its own exclusive LAMP environment, generates the image lamp:v1.1, and pushes it to the private warehouse. Specific requirements are as follows:
(1) Based on centos:7 base image;
(2) Specify author information;
(3) Install httpd, mariadb-server, php, php-mysql, php-gd; (
4) Expose ports 80 and 3306;
(5) Set The service starts automatically.
(6) Verify the image.