Skip to content

Commit b557dc3

Browse files
committed
add readme instructions for docker image builds
update tomcat on jdk8 image
1 parent 3137d46 commit b557dc3

File tree

3 files changed

+44
-7
lines changed

3 files changed

+44
-7
lines changed

Dockerfile-Readme.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Jre11-Tomcat9 build
2+
3+
####Get version of jdk
4+
https://pkgs.alpinelinux.org/package/edge/community/x86_64/openjdk11
5+
6+
Run Alpine container
7+
8+
jre11
9+
```docker run -ti --rm alpine sh
10+
apk add openjdk11
11+
java -version
12+
```
13+
14+
jre8
15+
```docker run -ti --rm alpine sh
16+
apk add openjdk8-jre
17+
java -version
18+
```
19+
copy Build version number into ENV JAVA_VERSION=<<????>>
20+
21+
22+
23+
### Get Tomcat9 version
24+
https://tomcat.apache.org/tomcat-9.0-doc/changelog.html
25+
copy latest version number from page above to ENV TOMCAT_VERSION <<<???>>>
26+
27+
### Image tag
28+
prasad1210/tomcat-custom:<<TOMCAT_VERSION>>.<<BUILD_NUMBER>>-alpine-jre-<JRE_VERSION_3_decimals>
29+
prasad1210/tomcat-custom:9.0.41.0-alpine-jre-11.0.09
30+
31+
### doker build command
32+
```
33+
docker build -t prasad1210/tomcat-custom:9.0.41.0-alpine-jre-11.0.09 . -f Dockerfile-tomcat-jre --no-cache
34+
docker push prasad1210/tomcat-custom:9.0.41.0-alpine-jre-11.0.09
35+
```

Dockerfile-tomcat-jre

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,23 @@ MAINTAINER "Prasad CH <[email protected]>"
1313
ENV OS_RELEASE="Alpine Linux v3.12"
1414

1515
# Installed main dependencies:
16-
# ca-certificates-bundle-20191127-r2 x86_64: for certificate management to support SSL
16+
# ca-certificates-bundle-20191127-r4 x86_64: for certificate management to support SSL
1717
# openjdk11: OpenJDK built by Simon Frankenberger <[email protected]> from https://hg.openjdk.java.net/jdk-updates/jdk11u
1818
# https://git.alpinelinux.org/aports/commit/?id=b85efc501595136485aea134946fa459bff115b0
19-
# fontconfig-2.13.1-r2 x86_64 : For supporting UI/ Fonts for reporting purposes
20-
# freetype-2.10.4-r0 x86_64: To support freetype fonts
19+
# freetype-2.10.4-r0 x86_64 : For supporting UI/ Fonts for reporting purposes
20+
# fontconfig-2.13.1-r2 x86_64: To support freetype fonts
2121
# Tomcat: Java Runtime Container
2222

2323
# https://adoptopenjdk.net/installation.html#x64_linux-jre
2424
# Set JRE_HOME not JAVA_HOME as we don't intend to run tomcat in debug mode
2525
ENV JRE_HOME=/usr/lib/jvm/default-jvm/jre
2626
COPY --from=stage-0 /usr/lib/jvm/default-jvm/jre/bin/jre ${JRE_HOME}
2727
ENV PATH=${JRE_HOME}/bin:$PATH
28-
ENV JAVA_VERSION=11.0.9+11-alpine-r1
28+
ENV JAVA_VERSION=11.0.9+11-alpine-r0
2929

3030
RUN set -eux;\
3131
apk update \
32+
&& apk upgrade \
3233
# Now Add Support for cacerts
3334
# https://hackernoon.com/alpine-docker-image-with-secured-communication-ssl-tls-go-restful-api-128eb6b54f1f
3435
&& apk add --no-cache ca-certificates\

Dockerfile-tomcat-jre-8

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# docker build -t prasad1210/tomcat-custom:9.0.40.0-alpine-jre-1.8.0-272-10-r2 . -f Dockerfile-tomcat-jre-8 --no-cache
1+
# docker build -t prasad1210/tomcat-custom:9.0.41.0-alpine-jre-1.8.0-272-10-r4 . -f Dockerfile-tomcat-jre-8 --no-cache
22
FROM alpine:latest
33
MAINTAINER "Prasad CH <[email protected]>"
44
ENV OS_RELEASE="Alpine Linux v3.12"
@@ -16,10 +16,11 @@ ENV OS_RELEASE="Alpine Linux v3.12"
1616
ENV JRE_HOME=/usr/lib/jvm/default-jvm/jre
1717
RUN apk --no-cache --virtual add openjdk8-jre --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
1818
ENV PATH=${JRE_HOME}/bin:$PATH
19-
ENV JAVA_VERSION=1.8.0_272.10-r2
19+
ENV JAVA_VERSION=1.8.0_272-b10
2020

2121
RUN set -eux;\
2222
apk update \
23+
&& apk upgrade \
2324
# Now Add Support for cacerts
2425
# https://hackernoon.com/alpine-docker-image-with-secured-communication-ssl-tls-go-restful-api-128eb6b54f1f
2526
&& apk add --no-cache ca-certificates\
@@ -58,7 +59,7 @@ ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOMCAT_NATIVE_LIBDIR
5859
ENV GPG_KEYS 05AB33110949707C93A279E3D3EFE6B686867BA6 07E48665A34DCAFAE522E5E6266191C37C037D42 47309207D818FFD8DCD3F83F1931D684307A10A5 541FBE7D8F78B25E055DDEE13C370389288584E7 61B832AC2F1C5A90F0F9B00A1C506407564C17A3 79F7026C690BAA50B92CD8B66A3AD3F4F22C4FED 9BA44C2621385CB966EBA586F72C284D731FABEE A27677289986DB50844682F8ACB77FC2E86E29AC A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 DCFD35E0BF8CA7344752DE8B6FB21E8933C60243 F3A04C595DB5B6A5F1ECA43E3B7BBB100D811BBE F7DA48BB64BCB84ECBA7EE6935CD23C10D498E23
5960

6061
ENV TOMCAT_MAJOR 9
61-
ENV TOMCAT_VERSION 9.0.40
62+
ENV TOMCAT_VERSION 9.0.41
6263
ENV TOMCAT_DOWNLOAD_URL https://downloads.apache.org/tomcat/tomcat-${TOMCAT_MAJOR}/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz
6364
ENV TOMCAT_SHA512_URL https://downloads.apache.org/tomcat/tomcat-${TOMCAT_MAJOR}/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512
6465
# https://downloads.apache.org/tomcat/tomcat-${TOMCAT_MAJOR}/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512

0 commit comments

Comments
 (0)