日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > java >内容正文

java

使用WildFly和Java EE 7映像与Docker提供者一起流浪

發布時間:2023/12/3 java 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 使用WildFly和Java EE 7映像与Docker提供者一起流浪 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

什么是無業游民?

Vagrant是創建虛擬開發環境的簡化且可移植的方式。 它可與多種虛擬化軟件一起使用,例如VirtualBox,VMWare,AWS等。 它還可以與多種配置軟件一起使用,例如Ansible,Chef,Puppet或Salt。

不再需要“在我的機器上工作”!
通常,提供者是通常的。 從1.6版開始,Docker容器也可以用作后端提供程序之一。 這使您的開發環境可以基于Docker容器而不是完整的虛擬機。 在docs.vagrantup.com/v2/docker/index.html上了解有關此內容的更多信息。

完整的開發環境定義(例如機器類型,需要安裝的軟件,網絡和其他配置信息)在文本文件(通常稱為Vagrantfile 。 基于提供者,它創建了虛擬開發環境。

在docs.vagrantup.com/v2/vagrantfile/index.html上了解有關文件中定義內容以及方法的更多信息。

流浪漢入門

入門指南非常簡單,易于遵循,讓Vagrant弄濕你的腳。 創建基本定義后,即可使用簡單的命令啟動環境:

vagrant up

完整的命令集在docs.vagrantup.com/v2/cli/index.html上定義。

Vagrant的默認提供程序是VirtualBox。 可以在CLI上將備用提供程序指定為:

vagrant up --provider=docker

這將根據Vagrantfile中指定的映像啟動Docker容器。

包裝形式

無業游民的環境被打包為Boxs 。 您可以從公開可用的框列表中進行搜索,以找到所需的框。 甚至創建自己的盒子,并使用以下命令將它們添加到中央存儲庫:

vagrant box add USER/BOX

流浪于WildFly Docker映像

學習完基本命令后,讓我們看看使用Vagrant啟動WildFly Docker映像需要做什么。

所述Vagrantfile在定義github.com/arun-gupta/vagrant-images/blob/master/docker-wildfly/Vagrantfile和在線所示:

Vagrant.configure(2) do |config|config.vm.provider "docker" do |d|# Define the Docker imaged.image = "jboss/wildfly:latest"end end

克隆git repo并更改為docker-wildfly目錄。 可以使用以下命令啟動流浪圖像:

vagrant up --provider=docker

并將輸出顯示為:

docker-wildfly> vagrant up Bringing machine 'default' up with 'docker' provider... ==> default: Docker host is required. One will be created if necessary...default: Vagrant will now create or start a local VM to act as the Dockerdefault: host. You'll see the output of the `vagrant up` for this VM below.default: default: Box 'mitchellh/boot2docker' could not be found. Attempting to find and install...default: Box Provider: virtualboxdefault: Box Version: >= 0default: Loading metadata for box 'mitchellh/boot2docker'default: URL: https://atlas.hashicorp.com/mitchellh/boot2dockerdefault: Adding box 'mitchellh/boot2docker' (v1.2.0) for provider: virtualboxdefault: Downloading: https://atlas.hashicorp.com/mitchellh/boxes/boot2docker/versions/1.2.0/providers/virtualbox.boxdefault: Successfully added box 'mitchellh/boot2docker' (v1.2.0) for 'virtualbox'!default: Importing base box 'mitchellh/boot2docker'...default: Matching MAC address for NAT networking...default: Checking if box 'mitchellh/boot2docker' is up to date...default: Setting the name of the VM: docker-host_default_1421277252359_12510default: Fixed port collision for 22 => 2222. Now on port 2203.default: Clearing any previously set network interfaces...default: Preparing network interfaces based on configuration...default: Adapter 1: natdefault: Forwarding ports...default: 2375 => 2375 (adapter 1)default: 22 => 2203 (adapter 1)default: Running 'pre-boot' VM customizations...default: Booting VM...default: Waiting for machine to boot. This may take a few minutes...default: SSH address: 127.0.0.1:2203default: SSH username: dockerdefault: SSH auth method: private keydefault: Warning: Connection timeout. Retrying...default:default: Vagrant insecure key detected. Vagrant will automatically replacedefault: this with a newly generated keypair for better security.default:default: Inserting generated public key within guest...default: Removing insecure key from the guest if its present...default: Key inserted! Disconnecting and reconnecting using new SSH key...default: Machine booted and ready! ==> default: Syncing folders to the host VM...default: Installing rsync to the VM...default: Rsyncing folder: /Users/arungupta/workspaces/vagrant-images/docker-wildfly/ => /var/lib/docker/docker_1421277277_78698 ==> default: Warning: When using a remote Docker host, forwarded ports will NOT be ==> default: immediately available on your machine. They will still be forwarded on ==> default: the remote machine, however, so if you have a way to access the remote ==> default: machine, then you should be able to access those ports there. This is ==> default: not an error, it is only an informational message. ==> default: Creating the container...

在固定#5187之前,該功能將不起作用。 但是至少該博客解釋了Vagrant的主要概念。

翻譯自: https://www.javacodegeeks.com/2015/01/vagrant-with-docker-provider-using-wildfly-and-java-ee-7-image.html

總結

以上是生活随笔為你收集整理的使用WildFly和Java EE 7映像与Docker提供者一起流浪的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。