Supported tags and respective
What is Jetty?
Jetty is a pure Java-based HTTP (Web) server and Java Servlet container. While Web Servers are usually associated with serving documents to people, Jetty is now often used for machine to machine communications, usually within larger software frameworks. Jetty is developed as a free and open source project as part of the Eclipse Foundation. The web server is used in products such as Apache ActiveMQ, Alfresco, Apache Geronimo, Apache Maven, Apache Spark, Google App Engine, Eclipse, FUSE, Twitter's Streaming API and Zimbra. Jetty is also the server in open source projects such as Lift, Eucalyptus, Red5, Hadoop and I2P. Jetty supports the latest Java Servlet API (with JSP support) as well as protocols SPDY and WebSocket.
Logo © Eclipse Foundation
How to use this image.
Run the default Jetty server (
CMD ["jetty.sh", "run"]):
docker run -d jetty:9
You can test it by visiting
http://container-ip:8080 in a browser or, if you need access outside the host, on port 8888:
docker run -d -p 8888:8080 jetty:9
You can then go to
http://host-ip:8888 in a browser.
The default Jetty environment in the image is:
JETTY_HOME = /usr/local/jetty JETTY_BASE = /var/lib/jetty JETTY_CONF = /usr/local/jetty/etc/jetty.conf JETTY_STATE = /run/jetty/jetty.state JETTY_ARGS = JAVA_OPTIONS = TMPDIR = /tmp/jetty
Webapps can be deployed under
/var/lib/jetty/webapps in the usual ways (WAR file, exploded WAR directory, or context XML file). To deploy your application to the
/ context, use the name
ROOT.war, the directory name
ROOT, or the context file
ROOT.xml (case insensitive).
For older EOL'd images based on Jetty 7 or Jetty 8, please follow the legacy instructions on the Eclipse Wiki and deploy under
/usr/local/jetty/webapps instead of
jetty as a read-only container, have Docker create the
/run/jetty directories as volumes:
docker run -d --read-only -v /tmp/jetty -v /run/jetty jetty:9
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.
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).
If you would like the image to start immediately as user
jetty instead of starting as
root, you can start the container with
docker run -d -u jetty jetty:9
View license information for the software contained in this 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.
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.