Skip to content

Commit 8538b31

Browse files
committed
Document HTTP/2 support
1 parent e1a6ae1 commit 8538b31

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

jetty/content.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,20 @@ $ docker run -d --read-only -v /tmp/jetty -v /run/jetty %%REPO%%
7070

7171
Since the container is read-only, you'll need to either mount in your webapps directory with `-v /path/to/my/webapps:/var/lib/jetty/webapps` or by populating `/var/lib/jetty/webapps` in a derived image.
7272

73+
## HTTP/2 Support
74+
75+
Starting with version 9.3, Jetty comes with built-in support for HTTP/2. However, due to potential license compatiblity issues with the ALPN library used to implement HTTP/2, the module is not enabled by default. In order to enable HTTP/2 support in a derived `Dockerfile` for private use, you can add a `RUN` command that enables the `http2` module and approve its license as follows:
76+
77+
```Dockerfile
78+
FROM jetty
79+
80+
RUN java -jar \$JETTY_HOME/start.jar --add-to-startd=http2 --approve-all-licenses
81+
```
82+
83+
This will add an `http2.ini` file to the `$JETTY_BASE/start.d` directory and download the required ALPN libraries into `$JETTY_BASE/lib/alpn`, allowing the use of HTTP/2. HTTP/2 connections should be made via the same port as normal HTTPS connections (container port 8443). If you would like to enable the `http2` module via `$JETTY_BASE/start.ini` instead, substitute `--add-to-start` in place of `--add-to-startd` in the `RUN` command above.
84+
85+
Once OpenJDK 9 becomes generally available with built-in support for ALPN, this image will be updated to enable HTTP/2 support by default.
86+
7387
# Security
7488

7589
By default, this image starts as user `root` and uses Jetty's `setuid` module to drop privileges to user `jetty` after initialization. The `JETTY_BASE` directory at `/var/lib/jetty` is owned by `jetty:jetty` (uid 999, gid 999).

0 commit comments

Comments
 (0)