Docker creates an image with Tomcat installed

Source: Internet
Author: User
Tags ssh tomcat

Docker creates an image with Tomcat installed with the process: Download the image first, start the container with mirroring, install Tomcat in the container, and then save the Tomcat container as a new image.

There are many ways Docker downloads images, such as

sudo docker pull ubuntu:14.04

14.04 means the image label of Ubuntu, if not tagged, Docker will automatically download the image of the latest tag.

Start a container with a mirror by the Run command

or use

To specify the name of the container when the container starts.

You can then install Tomcat in the container.

Specific installation method, I am here to provide a more complete download from the image to the Tomcat installation of an article

Links: http://www.21ops.com/linux/29783.html

Here is a little note that the image used in the article is not ubuntu:14.04, such as the use of ubuntu:14.04 may have a problem:

1, after installing SSH and using SSH login (~$ ssh root@127.0.0.1-p 49154), there will be Permission denied please try again.

There are a number of solutions available online for this error. The specific three categories are as follows:

A. Modify the/etc/ssh/sshd-config file to modify the Permitrootlogin No to yes,pubkeyauthentication Yes to no,authorizedkeysfile. ssh/ Authorized_keys Front plus # shield off, passwordauthentication no change to Yes

B. Modify the/etc/ssh/sshd-config file to modify the Permitrootlogin, pubkeyauthentication and passwordauthentication to Yes

C, modify the/etc/ssh/sshd-config file, change the Permitrootlogin and passwordauthentication to Yes

I read my own this file, because pubkeyauthentication is yes so I will permitrootlogin, passwordauthentication modified to Yes can be landed, in particular, according to the circumstances of their own choice.

2, in the installation

Apt-get Install python-software-properties
add-apt-repository Ppa:webupd8team/java

The second step appears: Ubuntu Add-apt-repository:command not found. The error

The solutions available online are:

In the installation

sudo apt-get install python-software-properties
Install later

sudo apt-get install Software-properties-common
And then take this one step further.

Add-apt-repository Ppa:webupd8team/java
Can.

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.