Use WebSphere® Developer Tools to create a
reference in the workbench to a Liberty server that is running in a Docker container. You can use
this reference to handle your server requests from the workbench.
About this task
You can install WebSphere Application Server Liberty
and download add-ons in the Liberty Repository from the WASdev community download site. After you
install Liberty, you can select your Docker container. Then, you can enter the Liberty server
security credentials for your Liberty server to create a workbench reference to your Liberty server
in your Docker container.
If a Docker command times out as you complete these steps, you can work around this problem. Set
the com.ibm.ws.st.DockerCommandTimeoutInSeconds system property to a time in
seconds. By default, this property is set to 10.
Important: You cannot select Clean Server on Next Start for
Liberty servers that are running in a Docker container.
- In the workbench, open the Servers view by clicking the
Servers tab.
Tip: If the Servers view is not visible, select and type Server in the filter text. Then, select
Servers.
- Right-click the Servers view and select .
- To select your server type, select .
- Enter the localhost value in the Server's host
name field.
- Click Next.
Note: Ensure that the Liberty runtime environment has the same set of features as the selected
Liberty docker image. Also, ensure that they are configured to use the same level of the Java runtime environment (JRE). The Liberty runtime environment is
used as the target runtime in the development environment. A mismatch between the local system
runtime and the JRE used in the Liberty docker image can cause problems from configuration errors to
application publishing issues.
- If the tools prompt you to install WebSphere
Application Server Liberty, either because it is not installed or because you need to input the
directory where it is installed, complete one of the following options. Otherwise, skip this
step.
You need Liberty to be installed so that you can create a workbench reference to a Liberty server
in a Docker container.
If you previously installed Liberty, complete the following steps to select the directory where
you installed it:
- Select Choose an existing installation.
- In the Path field, type or browse for the directory where you installed
the WebSphere Application Server Liberty.
- On the Liberty Runtime Environment page, click
Next.
The application-serving environment is selected. Skip the rest of this step.
If you want to install Liberty from an archive file that was previously downloaded, complete the
following steps:
- Select Install from an archive or repository, and click
Next.
- In the Destination field, type or browse to the directory where you want
to install the Liberty runtime environment.
If you type a path that does not exist, then a folder for that path is created automatically at
the end of the procedure when you click Finish.
- Select Install a new runtime environment from an archive.
- In the Path field, either type or browse to the archive file on the
local file system, and click Next.
- In the Install Add-ons page, click Install or
Install Pending to make your selection of add-on archive files that you want
to install on the Liberty runtime environment.
You can install an add-on archive file from your local file system, download an add-on archive
file, or use a combination of both when you install multiple add-on archive files. If the workbench
is connected to the internet, the Install Add-ons page is populated with add-on
archive files available for download from the WAS dev community download site.
This download site includes add-ons that you can select from the Liberty Repository, such as
runtime features, samples, or open source integration.
If you want to install add-on archive files from your local file system, complete the following
steps:
- Click Add Archive.
- In the Add-on archive field, type or browse to the add-on archive file on
the local file system.
- Click OK.
If you have more add-on archive files to install from your local file system, repeat this
procedure until you are done.
If you want to install add-on files from a custom repository, complete the following steps:
- To add the repository, click Configure Repositories.
- Click New....
The files are then added to the list of add-on files.
After you complete your selection in the Install Add-ons page, click
Next.
- In the License Acceptance page, if you accept the license terms, select
I accept the terms of all the license agreements then click
Next.
If you want to download and install the no-charge developer edition for Liberty, complete the
following steps:
- Select Install from an archive or repository, and click
Next.
- In the Destination field, type or browse to the directory where you want
to install the Liberty runtime environment.
If you type a path that does not exist, then a folder for that path is created automatically at
the end of the main procedure when you click Finish.
- Select Download and install a new runtime environment from ibm.com,
choose a runtime environment version, and then click Next.
- In the Install Add-ons page, click Install or
Install Pending to make your selection of add-on archive files that you want
to install on the Liberty runtime environment.
You can install add-on archive files by one of the following methods:
- From your local file system
- By downloading files
- By using a combination of both, when you install multiple add-on archive files
If the workbench is connected to the internet, the
Install Add-ons page
is populated with add-on archive files available for download from the
WAS dev community download site.
This download site includes add-ons that you can select from the Liberty Repository, such as
runtime features, samples, or open source integration.
If you want to install add-on archive files from your local file system, complete the following
steps:
- Click Add Archive.
- In the Add-on archive field, type or browse to the add-on archive file on
the local file system.
- Click OK.
If you have more add-on archive files to install from your local file system, repeat this
procedure until you are done.
If you want to install add-on files from a custom repository, complete the following steps:
- To add the repository, click Configure Repositories.
- Click New....
The files are then added to the list of add-on files.
After you complete your selection in the Install Add-ons page, click
Next.
- In the License Acceptance page, if you accept the license terms, select
I accept the terms of all the license agreements then click
Next.
- On the Liberty Server page, select Server in a Docker
container.
- Select your Docker container from the Container name menu.
Tip: If you do not see your Docker container in the Container name
menu, click Refresh to refresh the list.
- Enter the Liberty server security credentials.
Your values for the
User name and
Password fields
must correspond to a user that is defined in a user registry that has an administrator role. If the
tools cannot find a basic user registry that defines the specified user, the tools display the
Security Verification window. If the tools display the
Security
Verification window, complete one of the following options:
- Select Create to add a basic user registry that defines a user with your
values and an administrator role.
- Select Proceed to proceed if the user is defined in another user registry
type.
- Select Cancel to change the User name and
Password that you entered.
- Enter the value for the Secure port field with the HTTPS port that is
specified in the server configuration.
- Click Finish.