Docker uses the Maven plug-in to build the image, dockermaven
You can use the Maven Docker plug-in to build a Docker image.
Quick Start
Add the Docker plug-in to pom. xml
Run the following command to build a
Implementation of dependency processing and parallel compilation of Docker image under shellRecently, when making a series of Docker image compilation scripts, I thought we could not speed up the parallel compilation, checked the data, and finally implemented the multiple Docker
This is a creation in
Article, where the information may have evolved or changed.
This article will show you how to use Docker packaging a golang written application, the final product is a dockerfile file, do not underestimate this short line of code, the knowledge points involved can be many, next we will carefully analyze it.
FROM golang:alpineADD src /go/srcR
: ${docker.image.prefix} is your user name in the Docker's official repository, if you don't need to upload an image, just fill it out.Through the MAVEN command:First step: mvn cleanStep Two: MVN package Docker:bulid, as follows:Step 2/6: volume/tmp-> Running in a98be3878053-> 8286e98b54c5 removing intermediate container a98be3878053 step 3/6: ADD springboot-with-docker
Docker consists of three concepts:(1) The remote Repository is the aggregate of all the mirrors in the Remote Mirror Library (no entry operation).(2) The local image is the image pulled from the remote repository.(3) A local image
.
Step 4: generate an image. The command is docker build-t test/test_app. (Note: Here is an English period.) Note: in this process, docker needs to download and install the jdk and tomcat programs, so it is very busy. You can run
Tags: cloud computingThe virtual machine is dead and the container is the future. So, what does the container (for example Docker) Replace a virtual machine? What are the differences between Docker and virtual machine, and
1, actual combat purposes
build an enterprise-private mirrored warehouse that meets push and pull mirroring from the development environment . When we use k8s to orchestrate and dispatch containers, the basic unit of the operation is mirroring, so we need to pull the mirror from the repository to the current working node. The use of a public Docker hub is
How do I remove a mirror from a private registry?First, by default, Docker registry is not allowed to remove mirrors and needs to be enabled in the configuration config.yml : vim/etc/docker/registry/config.yml0.1 log: Fields : service:registrystorage: Delete: true Cache: blobdescriptor:inmemory filesystem: /var/lib/registryhttp: Addr:: headers:
:1.01
Note that the packaging command must be executed under Dockerfile and hello_world.sh, And the last "." command is followed by the context path.
2. Check the image file list to see if it is successful.
1 [root@localhost herui]# docker images2 REPOSITORY TAG
When you create a mirror through dockerfile, it is generally based on the official image provided by the Docker Hub. The following describes how to create a personal private base image on a ubuntu16 system .1, install bootstrap tool Debootstrap$ sudo apt-get insall debootstrap-y2. Download ubuntuxenial (16.04) binaries
Problem Description:Using the command yum-y install Docker installed on the CENTOS7 system, when downloading the image is very slow, the last mirror download failed, and reported "Net/http:tls Handshake Timeout" error:[[emailprotected] ~]# Docker run-d--restart=unless-stopped-p 8080:8080-p 9345:9345 rancher/server:stab
#number of filess allower per db, requires--quota--rest #开启简单的rest API--repair #修复所有数据库run Repair on all DBS--repairpath arg #修复库生成的文件的目录, default to directory name DBPath--slowms Arg (=100) #value of slow for profiles and console log--smallfiles #使用较小的默认文件--syncdelay Arg (=60) #数据写入磁盘的时间秒数 (0=never, not recommended)--sysinfo #打印一些诊断系统信息--upgrade #如果需要升级数据库 * Replication parameters-----------------------------------------------------------------------------------------------------fastsync #从一个d
downloading the whole folder under a number of projects, the actual combat use is Loadbalancedemo, proposed with INTELLJ idea to the form of MAVEN project to import.Open the Pom.xml file in your project and you can see the value of the bottom-most plugin node: To start making a Docker image file, let's get the job done first:1. Create an empty folder,
Well, I thought it would be easy to remove the image, but it's a little bit of a puzzle to start with. By deleting it, it was easy to find out. Share My experience:In two cases: to remove the image, first delete the container, delete the container, make sure the container is stopped, 2; the command to delete the container and delete the mirror
": "Server=192.168.99.100;user id=root;password=123456;persistsecurityinfo=true;port=3307;database=user; Sslmode=none "Go to E:\web\ilinkcore (this directory is the root directory for the solution)Docker-compose upAfter successful execution, a ilinkcore image is created and a ilinkcore_ilinkcore_1 container
Create a docker image and initialize the jdk8 and tomcat environments.1. Create a Dockerfile:
Create a Dockerfile and download jdk and tomcat in the same directory as Dockerfile.
Dockerfile content:
1 FROM Ubuntu: 14.10 2 MAINTAINER linx 3 4 # ADD java and tomcat to the container 5 ADD jdk-8u31-linux-x64.tar.gz/usr/local/6 ADD apache-tomcat-8.0.20.tar.gz/usr/local/7 8 # configure java and tomcat Environmen
=" Wkiom1wjhoqbbbseaakvgqxrige289.jpg "/>
Run a Container test command: Docker run-d--name ssh_ubuntu_test-p 0.0.0.0:10000:22 Ssh_ubuntuCommand parsing-D is started in daemon mode--name Defining container Names-P is a port that defines ports (above this means that 10000 ports on the local host (host) are mapped to the 22 ports of the container650) this.width=65
Installation environment, CentOS Linux version 3.10.0-514.el7.x86_641. Find the latest MySQL imageDocker search MySQL2, download the latest mysql-server imageDocker pull Mysql/mysql-server:latest 3, after the download is complete, you can view the downloaded image Docker images 4, build container, the-e command to set the default password,--name can customize the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.