Sign inSign up

sivasakthi/jetty

By sivasakthi

Updated over 10 years ago

Dokcer run -d -p 8080:8080 sivasakthi/jetty

Image
0

10K+

sivasakthi/jetty repository overview

Dockerfile:

FROM ubuntu MAINTAINER sivasakthi

Required for apt-add-repository

RUN apt-get -qq update RUN apt-get -qq install software-properties-common python-software-properties

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9 RUN apt-add-repository "deb http://repos.azulsystems.com/ubuntu stable main" RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test RUN apt-get -qq update RUN apt-get -qq upgrade

RUN apt-get -qq install curl bash unzip RUN apt-get -qq install zulu-8

ADD start-jetty.sh /opt/start-jetty.sh RUN chmod +x /opt/start-jetty.sh

Install Jetty

ADD http://download.eclipse.org/jetty/8.1.17.v20150415/dist/jetty-distribution-8.1.17.v20150415.tar.gz /opt/jetty.tar.gz RUN tar -xvf /opt/jetty.tar.gz -C /opt/ RUN rm /opt/jetty.tar.gz RUN mv /opt/jetty-distribution-* /opt/jetty RUN rm -rf /opt/jetty/webapps.demo RUN useradd jetty -U -s /bin/false RUN chown -R jetty:jetty /opt/jetty

Setup UTF * based terminal

RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8

EXPOSE 8080

Run Jetty

CMD ["/opt/start-jetty.sh"]

start-jetty.sh

#!/bin/sh

if [ -d /etc/jetty/webapps ]; then echo "Copying jetty wars" rm -rf /opt/jetty/webapps/* cp /etc/jetty/webapps/* /opt/jetty/webapps fi

If custom Jetty config folder mapped copy files into jetty/etc/

if [ -d /etc/jetty/config ]; then echo "Copying custom config" cp /etc/jetty/config/* /opt/jetty/etc/ fi

If custom Jetty context folder mapped copy files into jetty/contexts/

if [ -d /etc/jetty/contexts ]; then echo "Copying custom Contexts" rm -rf /opt/jetty/contexts/* cp /etc/jetty/contexts/* /opt/jetty/contexts/ fi

If check if custom init script exists

if [ -e /etc/jetty/init.sh ]; then echo "Running custom init script" chmod +x /etc/jetty/init.sh /etc/jetty/init.sh fi

/opt/jetty/bin/jetty.sh run

Tag summary

Content type

Image

Digest

Size

242.3 MB

Last updated

over 10 years ago

docker pull sivasakthi/jetty