[JAVA] Build a WAS execution environment from Docker

At the beginning

See Let's run WAS Liberty environment on Docker and try running WAS on Docker. To. First of all, I tried to install Docker-ToolBox, but I can not jump to the Docker-ToolBox download site from the link introduced on the above site. When I searched on Google, the download site of docker-ToolBox is https://www.docker.com/get-docker it seems like

How to deal with errors that occur during docker setup

Double-clicking on Docker Quickstart Terminal results in an error 1

If you do not choose to install Git when installing Docker, you need to specify the installed Git Bash in the shortcut path of "Docker Quickstart Terminal"

Double-clicking on Docker Quickstart Terminal results in an error 2

Double-click on Docker Quickstart Terminal

Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory

If you get the error, you need to set the virtualization on the BIOS of the OS. By the way, in order to launch the BIOS setting screen on Win10, it is necessary to go through "Update and Security" from the setting (Reference site) http://tanweb.net/2017/12/22/17401/

Start WAS

1. 1. Download the WAS Liberty virtual image from Dokcer Hub

Execute the following command

docker pull websphere-liberty

2. Perform virtual image boot

(1) Execution in interactive mode

Execute the following command

docker run -it websphere-liberty

(2) Execution in background mode

Execute the following command

docker run -d -p 80:9080 --name wlp websphere-liberty

(3) Check the log

Execute the following command

docker logs --tail=all -f wlp

(4) Check the IP address

Execute the following command

docker-machine ip

Deploy the application

1. 1. Uploading an application to a virtual environment

docker-machine scp localhost:/docker/ci.docker.tutorials/app/ServletApp.war $(docker-machine active):/tmp/ServletApp.war

It is said that it will work,

[email protected]'s password:    
Permission denied, please try again.

I was asked for a password for [email protected] that I don't remember setting, and it didn't work. It can't be helped, so I put WinSCP and put SCP, and I was able to upload the file to the virtual environment successfully.

2. Deploy the application

Execute the following command

docker run -d -p 80:9080 --name=app -v /tmp/ServletApp.war:/config/dropins/app.war websphere-liberty

(Meaning of command) Guest /tmp/ServletApp.war on port 80 on the host side and port 9080 on the guest side Debrow a web application placed in

3. 3. Confirm that the deployed application is running on the guest terminal

Execute the following command

docker ps

3. 3. Stop and undeploy the deployed application

Execute the following command

- docker kill app
- docker rm app

4. Deploy application from file from Dockerfile

(1) Contents of Dockerfile

FROM websphere-liberty    
ADD ServletApp.war /config/dropins/app.war

(2) Command to be executed

docker run -d -p 80:9080 --name=app app

Recommended Posts

Build a WAS execution environment from Docker
Build a Node.js environment with Docker
Build a PureScript development environment with Docker
Build a Wordpress development environment with Docker
Build Cakephp environment from docker installation Ubuntu
[Docker] Build Jupyter Lab execution environment with Docker
Build a simple Docker + Django development environment
Build a development environment for Docker + Rails6 + Postgresql
Build a Laravel / Docker environment with VSCode devcontainer
Build a WordPress development environment quickly with Docker
Build a simple Docker Compose + Django development environment
Build a development environment for Docker, java, vscode
Pytorch execution environment with Docker
Easily build a Vue.js environment with Docker + Vue CLI
[Note] Build a Python3 environment with Docker in EC2
Build docker environment with WSL
[Note] Create a java environment from scratch with docker
Ruby ① Build a Windows environment
[Docker] Build a Wordpress environment locally (Win, Mac) quickly
Try to build a Java development environment using Docker
[2021] Build a Docker + Vagrant environment for using React / TypeScript
Build a Node-RED environment with Docker to move and understand
Create a Vue3 environment with Docker!
Build a Tomcat 8.5 environment with Pleiades 4.8
Build PlantUML environment with VSCode + Docker
Build environment with vue.js + rails + docker
Build Rails environment with Docker Compose
Build a XAMPP environment on Ubuntu
Build Unity development environment on docker
Build docker + laravel environment with laradock
Build a browser test environment using Capybara in the Docker development environment
Build a development environment for Django + MySQL + nginx with Docker Compose
I tried to build a laravel operating environment while remembering Docker
Create a web environment quickly using Docker
Re-study Docker from a system operation perspective
Build a Java development environment on Mac
Build Redmine code reading environment on Docker
Build an environment with Docker on AWS
Build a JMeter environment on your Mac
Build by specifying docker as a file
Build an Ultra96v2 development environment on Docker 1
Build TensorFlow operation check environment with Docker
How to build Rails 6 environment with Docker
How to build a Ruby on Rails environment using Docker (for Docker beginners)
I tried to build a Firebase application development environment with Docker in 2020
[Copy and paste] Build a Laravel development environment with Docker Compose Part 2
How to build a Ruby on Rails development environment with Docker (Rails 6.x)
Build a local development environment for Rails tutorials with Docker (Rails 6 + PostgreSQL + Webpack)
[Copy and paste] Build a Laravel development environment with Docker Compose Participation
How to build a Ruby on Rails development environment with Docker (Rails 5.x)
Template: Build a Ruby / Rails development environment with a Docker container (Ubuntu version)
Template: Build a Ruby / Rails development environment with a Docker container (Mac version)
Build a Doker-based development environment on Windows 10 Home 2020 ver. Part 1 Until WSL2-based Docker build
[Memo] Create a CentOS 8 environment easily with Docker
Create a Privoxy + Tor environment instantly using Docker
How to get a heapdump from a Docker container
[Java] Build Java development environment on Ubuntu & check execution
Build a Kotlin app using OpenJDK's Docker container
Build a Laravel environment on an AWS instance
Build a container for Docker x Laravel phpMyAdmin
[Win10] Build a JSF development environment with NetBeans