websphere-liberty official docker image

Official IBM WebSphere Application Server for Developers Liberty Profile image.

Supported tags and respective Dockerfile links

For more information about this image and its history, please see the relevant manifest file (library/websphere-liberty) in the docker-library/official-images GitHub repo.

Overview

This image contains IBM WebSphere Application Server for Developers Liberty Profile and the IBM Java Runtime Environment. For more information on WebSphere Application Server Liberty Profile, see the WASdev site.

Usage

In order to use the image, it is necessary to accept the terms of the WebSphere Application Server for Developers and IBM JRE licenses. This is achieved by specifying the environment variable LICENSE equal to accept when running the image. You can also view the license terms by setting this variable to view. Failure to set the variable will result in the termination of the container with a usage statement.

The image is designed to support a number of different usage patterns. The following examples are based on the Liberty application deployment sample and assume that DefaultServletEngine.zip has been extracted to /tmp and the server.xml updated to accept HTTP connections from outside of the container by adding the following element inside the server stanza:

  1. The image contains a default server configuration that specifies the webProfile-6.0 feature and exposes ports 9080 and 9443 for HTTP and HTTPS respectively. A WAR file can therefore be mounted in to the dropins directory of this server and run. The following example starts a container in the background running a WAR file from the host file system with the HTTP and HTTPS ports mapped to 80 and 443 respectively.

    docker run -e LICENSE=accept -d -p 80:9080 -p 443:9443 \
        -v /tmp/DefaultServletEngine/dropins/Sample1.war:/opt/ibm/wlp/usr/servers/defaultServer/dropins/Sample1.war \
        websphere-liberty

    Once the server has started, you can browse to http://localhost/Sample1/SimpleServlet on the Docker host.

  2. For greater flexibility over configuration, it is possible to mount an entire server configuration directory from the host and then specify the server name as a parameter to the run command. Note that this particular example server configuration only provides HTTP access.

    docker run -e LICENSE=accept -d -p 80:9080 \
      -v /tmp/DefaultServletEngine:/opt/ibm/wlp/usr/servers/DefaultServletEngine \
      websphere-liberty /opt/ibm/wlp/bin/server run DefaultServletEngine
  3. It is also possible to build an application layer on top of this image using either the default server configuration or a new server configuration and, optionally, accept the license as part of that build. Here we have copied the Sample1.war from /tmp/DefaultServletEngine/dropins to the same directory as the following Dockerfile.

    FROM websphere-liberty
    ADD Sample1.war /opt/ibm/wlp/usr/servers/defaultServer/dropins/
    ENV LICENSE accept

    This can then be built and run as follows:

    docker build -t app .
    docker run -d -p 80:9080 -p 443:9443 app
  4. Lastly, it is possible to mount a data volume container containing the application and the server configuration on to the image. This has the benefit that it has no dependency on files from the host but still allows the application container to be easily re-mounted on a newer version of the application server image. The example assumes that you have copied the /tmp/DefaultServletEngine directory in to the same directory as the Dockerfile.

    Build and run the data volume container:

    FROM websphere-liberty
    ADD DefaultServletEngine /opt/ibm/wlp/usr/servers/DefaultServletEngine
    
    docker build -t app-image .
    docker run -d -v /opt/ibm/wlp/usr/servers/DefaultServletEngine \
        --name app app-image true

    Run the WebSphere Liberty image with the volumes from the data volume container mounted:

    docker run -e LICENSE=accept -d -p 80:9080 \
      --volumes-from app websphere-liberty \
      /opt/ibm/wlp/bin/server run DefaultServletEngine

License

The Dockerfiles and associated scripts are licensed under the Apache License 2.0.

Licenses for the products installed within the images are as follows:

The product licenses associated with an image can be displayed by specifying the LICENSE=view environment variable as described above. Note that these licenses do not permit further distribution and that the terms for WebSphere Application Server in the latest/8.5.5 image restrict usage to a developer machine or build server only, or subject to a maximum 2 gigabyte heap usage across all instances. Instructions are available to enable entitled customers to upgrade the Docker Hub image for production use or build their own production licensed image.

Supported Docker versions

This image is officially supported on Docker version 1.6.2.

Support for older versions (down to 1.0) is provided on a best-effort basis.


Docker, Inc is the company behind the open source Docker platform and the growing Docker ecosystem of contributors, partners and adopters revolutionizing the way distributed applications are built, shipped, and run.



Website: docker.com





Copyright (c) 2014-2015 Docker, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Login to View or Leave Comments

Container
Converse with your fellow Users in the Automic Community.

Updated:
May 14, 2015