Docker Learning Notes

Source: Internet
Author: User
Keywords Docker mirrors Javase docker learning notes
Tags centos download etc import install java kernel key
Docker study notes one. Update kernel, upgrade kernel to 3.x two. Install Docker:

RPM--import/etc/pki/rpm-gpg/rpm-gpg-key-epel-6

Yum-y Install Docker-io

Three. Start Docker:

Service Docker start

Chkconfig Docker on

Four. Download the base mirror image:

Docker Pull Centos:latest

Five. To view local mirrors:

Docker images

Six. Add run File: (Take se as an example)

Dockerfile, Dockertest.jar, jdk1.8.0_141

Dockerfile:

From Centos:latest

COPY jdk1.8.0_141 jdk1.8.0_141

ENV java_home=/jdk1.8.0_141

ENV path= $JAVA _home/bin: $PATH

Envclasspath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar

ADD Dockertest.jar Demo1.jar

RUN bash-c ' Touch/demo1.jar '

Entrypoint["Java", "-jar", "/demo1.jar"

Seven. Buil folder and load to mirror

Docker build-t Test (custom mirror name).

Eight. Running Mirrors

Docker Run-i-T

Nine. View currently running mirrors

Docker PS

Ten. Remove Mirror 1. Stop mirroring:

Docker stop

Where the container ID is Docker PS query out of the container ID or in the running mirror exit exit

2. Remove Mirror

Docker RMI or Docker rmi-f

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.