Merge pull request #527 from jamiecoleman92/master
Updated sample to use Java EE7
This commit is contained in:
commit
5dca93f2db
|
|
@ -24,7 +24,7 @@ There are also corresponding image tags that contain the version number of the L
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
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:
|
The images are designed to support a number of different usage patterns. The following examples are based on the Java EE7 Liberty [application deployment sample](https://developer.ibm.com/wasdev/docs/article_appdeployment/) and assume that [DefaultServletEngine.zip](https://github.com/WASdev/sample.servlet/releases/download/V1/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
|
```xml
|
||||||
<httpEndpoint host="*" httpPort="9080" httpsPort="-1"/>
|
<httpEndpoint host="*" httpPort="9080" httpsPort="-1"/>
|
||||||
|
|
@ -35,7 +35,7 @@ The images are designed to support a number of different usage patterns. The fol
|
||||||
```console
|
```console
|
||||||
$ docker run -d -p 80:9080 -p 443:9443 \
|
$ docker run -d -p 80:9080 -p 443:9443 \
|
||||||
-v /tmp/DefaultServletEngine/dropins/Sample1.war:/config/dropins/Sample1.war \
|
-v /tmp/DefaultServletEngine/dropins/Sample1.war:/config/dropins/Sample1.war \
|
||||||
websphere-liberty:webProfile6
|
websphere-liberty:webProfile7
|
||||||
```
|
```
|
||||||
|
|
||||||
When the server is started, you can browse to http://localhost/Sample1/SimpleServlet on the Docker host.
|
When the server is started, you can browse to http://localhost/Sample1/SimpleServlet on the Docker host.
|
||||||
|
|
@ -47,13 +47,13 @@ The images are designed to support a number of different usage patterns. The fol
|
||||||
```console
|
```console
|
||||||
$ docker run -d -p 80:9080 \
|
$ docker run -d -p 80:9080 \
|
||||||
-v /tmp/DefaultServletEngine:/config \
|
-v /tmp/DefaultServletEngine:/config \
|
||||||
websphere-liberty:webProfile6
|
websphere-liberty:webProfile7
|
||||||
```
|
```
|
||||||
|
|
||||||
3. You can also build an application layer on top of this image by using either the default server configuration or a new server configuration. In this example, we have copied the `Sample1.war` from `/tmp/DefaultServletEngine/dropins` to the same directory as the following Dockerfile.
|
3. You can also build an application layer on top of this image by using either the default server configuration or a new server configuration. In this example, we have copied the `Sample1.war` from `/tmp/DefaultServletEngine/dropins` to the same directory as the following Dockerfile.
|
||||||
|
|
||||||
```dockerfile
|
```dockerfile
|
||||||
FROM websphere-liberty:webProfile6
|
FROM websphere-liberty:webProfile7
|
||||||
ADD Sample1.war /config/dropins/
|
ADD Sample1.war /config/dropins/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -69,7 +69,7 @@ The images are designed to support a number of different usage patterns. The fol
|
||||||
Build and run the data volume container:
|
Build and run the data volume container:
|
||||||
|
|
||||||
```dockerfile
|
```dockerfile
|
||||||
FROM websphere-liberty:webProfile6
|
FROM websphere-liberty:webProfile7
|
||||||
ADD DefaultServletEngine /config
|
ADD DefaultServletEngine /config
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -83,7 +83,7 @@ The images are designed to support a number of different usage patterns. The fol
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker run -d -p 80:9080 \
|
$ docker run -d -p 80:9080 \
|
||||||
--volumes-from app websphere-liberty:webProfile6
|
--volumes-from app websphere-liberty:webProfile7
|
||||||
```
|
```
|
||||||
|
|
||||||
# Using IBM JRE Class data sharing
|
# Using IBM JRE Class data sharing
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue