add apache-tomcat container

Signed-off-by: Wang, Long <long1.wang@intel.com>
This commit is contained in:
Wang, Long
2019-07-26 16:27:37 +08:00
committed by qzheng527
parent 79580ec02f
commit f72b8a7aaf
3 changed files with 69 additions and 1 deletions
+2 -1
View File
@@ -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:
+36
View File
@@ -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"]
+31
View File
@@ -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