Skip to content

Commit

Permalink
Changes for separation of config/output and license removal
Browse files Browse the repository at this point in the history
  • Loading branch information
lwhit3 authored and David Currie committed Dec 21, 2015
1 parent 3163284 commit 13504f3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
30 changes: 13 additions & 17 deletions websphere-liberty/content.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Overview

The images in this repository contain IBM WebSphere Application Server for Developers Liberty Profile and the IBM Java Runtime Environment. For more information on WebSphere Application Server Liberty, see the [WASdev](https://developer.ibm.com/wasdev/docs/category/getting-started/) site.
The images in this repository contain IBM WebSphere Application Server for Developers Liberty Profile and the IBM Java Runtime Environment. See the license section below for restrictions relating to the usage of this image. For more information on WebSphere Application Server Liberty, see the [WASdev](https://developer.ibm.com/wasdev/docs/category/getting-started/) site.

# Images

Expand All @@ -10,7 +10,7 @@ The `kernel` image contains just the Liberty kernel and no additional runtime fe

```dockerfile
FROM websphere-liberty:kernel
COPY server.xml /opt/ibm/wlp/usr/servers/defaultServer/
COPY server.xml /config/
RUN installUtility install --acceptLicense defaultServer
```

Expand All @@ -24,8 +24,6 @@ There are also corresponding image tags that contain the version number of the L

# Usage

In order to use any of the images, 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 an 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 images are designed to support a number of different usage patterns. The following examples are based on the Java EE6 Liberty [application deployment sample](https://developer.ibm.com/wasdev/docs/article_appdeployment/) and assume that [DefaultServletEngine.zip](https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/resource/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:

```xml
Expand All @@ -35,8 +33,8 @@ The images are designed to support a number of different usage patterns. The fol
1. Each image contains a default server configuration that specifies the corresponding features 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.

```console
$ 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 \
$ docker run -d -p 80:9080 -p 443:9443 \
-v /tmp/DefaultServletEngine/dropins/Sample1.war:/config/dropins/Sample1.war \
websphere-liberty:webProfile6
```

Expand All @@ -47,17 +45,16 @@ The images are designed to support a number of different usage patterns. The fol
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.

```console
$ docker run -e LICENSE=accept -d -p 80:9080 \
-v /tmp/DefaultServletEngine:/opt/ibm/wlp/usr/servers/DefaultServletEngine \
websphere-liberty:webProfile6 /opt/ibm/wlp/bin/server run DefaultServletEngine
$ docker run -d -p 80:9080 \
-v /tmp/DefaultServletEngine:/config \
websphere-liberty:webProfile6
```

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.
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. Here we have copied the `Sample1.war` from `/tmp/DefaultServletEngine/dropins` to the same directory as the following Dockerfile.

```dockerfile
FROM websphere-liberty:webProfile6
ADD Sample1.war /opt/ibm/wlp/usr/servers/defaultServer/dropins/
ENV LICENSE accept
ADD Sample1.war /config/dropins/
```

This can then be built and run as follows:
Expand All @@ -73,20 +70,19 @@ The images are designed to support a number of different usage patterns. The fol

```dockerfile
FROM websphere-liberty:webProfile6
ADD DefaultServletEngine /opt/ibm/wlp/usr/servers/DefaultServletEngine
ADD DefaultServletEngine /config
```

```console
$ docker build -t app-image .
$ docker run -d -v /opt/ibm/wlp/usr/servers/DefaultServletEngine \
$ docker run -d -v /config \
--name app app-image true
```

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

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

2 changes: 1 addition & 1 deletion websphere-liberty/license.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Licenses for the products installed within the images are as follows:
- [IBM WebSphere Application Server](https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/8.5.5.5/lafiles/runtime/en.html) in the `latest`/`8.5.5` image (International License Agreement for Non-Warranted Programs)
- [IBM WebSphere Application Server Liberty v9 Beta with Java EE 7](https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/beta/lafiles/en.html) in the `beta` image (International License Agreement for Early Release of Programs)

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](https://github.com/WASdev/ci.docker/tree/master/websphere-liberty/8.5.5/production-upgrade) the Docker Hub image for production use or [build](https://github.com/WASdev/ci.docker/tree/master/websphere-liberty/8.5.5/production-install) their own production licensed image.
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](https://github.com/WASdev/ci.docker/tree/master/websphere-liberty/8.5.5/production-upgrade) the Docker Hub image for production use or [build](https://github.com/WASdev/ci.docker/tree/master/websphere-liberty/8.5.5/production-install) their own production licensed image.

0 comments on commit 13504f3

Please sign in to comment.