diff --git a/.travis.yml b/.travis.yml index 62e42b8..959fea6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,15 +22,16 @@ env: - DOCKERFILE_DIR=node - DOCKERFILE_DIR=openjdk - DOCKERFILE_DIR=os-core - - DOCKERFILE_DIR=rabbitmq - DOCKERFILE_DIR=perl - DOCKERFILE_DIR=php - DOCKERFILE_DIR=php-fpm - DOCKERFILE_DIR=postgres - DOCKERFILE_DIR=python + - DOCKERFILE_DIR=rabbitmq - DOCKERFILE_DIR=redis - DOCKERFILE_DIR=ruby - DOCKERFILE_DIR=tensorflow + - DOCKERFILE_DIR=tomcat - DOCKERFILE_DIR=wordpress script: diff --git a/tomcat/Dockerfile b/tomcat/Dockerfile new file mode 100644 index 0000000..443591b --- /dev/null +++ b/tomcat/Dockerfile @@ -0,0 +1,36 @@ +FROM clearlinux:latest AS builder +MAINTAINER long1.wang@intel.com + +ARG swupd_args +# Move to latest Clear Linux release to ensure +# that the swupd command line arguments are +# correct +RUN swupd update --no-boot-update $swupd_args + +# Grab os-release info from the minimal base image so +# that the new content matches the exact OS version +COPY --from=clearlinux/os-core:latest /usr/lib/os-release / + +# Install additional content in a target directory +# using the os version from the minimal base +RUN source /os-release && \ + mkdir /install_root \ + && swupd os-install -V ${VERSION_ID} \ + --path /install_root --statedir /swupd-state \ + --bundles=apache-tomcat --no-boot-update + +# For some Host OS configuration with redirect_dir on, +# extra data are saved on the upper layer when the same +# file exists on different layers. To minimize docker +# image size, remove the overlapped files before copy. +RUN mkdir /os_core_install +COPY --from=clearlinux/os-core:latest / /os_core_install/ +RUN cd / && \ + find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true + +FROM clearlinux/os-core:latest + +COPY --from=builder /install_root / + +EXPOSE 8080 +CMD ["catalina.sh", "run"] diff --git a/tomcat/README.md b/tomcat/README.md new file mode 100644 index 0000000..3712fd1 --- /dev/null +++ b/tomcat/README.md @@ -0,0 +1,31 @@ +tomcat +========== +This provides a Clear Linux* apache-tomcat container + +Build +----- +``` +docker build -t clearlinux/tomcat . +``` + +Or just pull it from Dockerhub +--------------------------- +``` +docker pull clearlinux/tomcat +``` + +Run apache-tomcat instance +----------------------- +``` +docker run --rm -it --hostname my-tomcat --name some-tomcat -p 8080:8080 clearlinux/tomcat +``` + +Details of how-to +--------------------- +- Please refer to the docker official tomcat image [page](https://hub.docker.com/_/tomcat). + +Extra Build ARGs +---------------- +- ``swupd_args`` Specifies [SWUPD](https://github.com/clearlinux/swupd-client/blob/master/docs/swupd.1.rst#options) flags + +Default build args in Docker are on: https://docs.docker.com/engine/reference/builder/#arg