Distributed: [AIX MacOS Linux Windows]

Running Docker applications directly from a workspace

For quicker publish operations in a development environment, immediately run Docker applications directly from the workspace when you create a server.

Before you begin

See Creating a workbench Liberty server in a Docker container by using developer tools in the product documentation. Follow the procedure, but after step 10 then continue with this procedure.

About this task

Run Docker applications directly from a workspace without special packaging.

For Windows platformsIf you use Docker, store the Eclipse workspace in the C:\Users directory.

If you are a macOS user, store the workspace in the /Users directory.

If you want to use a workspace that is outside the default users directory, the directory needs to be shared and accessible from the Docker container.

For Windows and macOS users, Docker loose configuration is only supported if the workspace folder, or a parent is shared with Docker. On Windows, the C:\Users folder is shared by default. If another folder is used, then it must be added to the shared folders in Docker. On Windows where Docker toolbox is used, the Name of the shared folder must match the Path of the shared folder. For example, if the path is C:\myDir\mySubDir, then the name must be c/myDir/mySubDir.

Procedure

  1. Select the Run applications directly from the workspace box.
  2. Click Verify
  3. Click Finish.
  4. If your container already has the necessary mounted volumes to support running applications directly from the workspace, these volumes are maintained and the task is complete. If more mounted volumes are required to support running applications directly from the workspace, a dialog box displays to ask if you want to create a new container with the additional volumes. Existing volumes are maintained. Select Yes.
    • If the container cannot run applications directly from the workspace, select Yes to turn on the option to run applications directly from the workspace. This option stops the current container, and a new container with mounted volumes is created. Select No to continue to use the current container with the option to run applications directly from the workspace turned off.
    • If the container can, then it is used as it is, and no new container is created.
    • If the container that you are running does not support running applications directly from the workspace, you can proceed with running the applications after you clear the option. However, you cannot run them directly from the workspace. If you choose to run applications directly from a workspace, the current container is stopped, and a new container is created.