File tree Expand file tree Collapse file tree 3 files changed +41
-2
lines changed
src/main/java/com/example/easynotes Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Original file line number Diff line number Diff line change
1
+ FROM adoptopenjdk/openjdk11:x86_64-alpine-jre-11.0.6_10
2
+
3
+ # Inspired from https://github.com/docker-library/tomcat/blob/d570ad0cee10e4526bcbb03391b2c0e322b59313/9.0/jdk11/openjdk-slim/Dockerfile
4
+ ENV CATALINA_HOME /usr/local/tomcat
5
+ ENV PATH $CATALINA_HOME/bin:$PATH
6
+ RUN mkdir -p "$CATALINA_HOME"
7
+ WORKDIR $CATALINA_HOME
8
+
9
+ # let "Tomcat Native" live somewhere isolated
10
+ ENV TOMCAT_NATIVE_LIBDIR $CATALINA_HOME/native-jni-lib
11
+ ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOMCAT_NATIVE_LIBDIR
12
+
13
+ # see https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/KEYS
14
+ # see also "update.sh" (https://github.com/docker-library/tomcat/blob/master/update.sh)
15
+ ENV GPG_KEYS 05AB33110949707C93A279E3D3EFE6B686867BA6 07E48665A34DCAFAE522E5E6266191C37C037D42 47309207D818FFD8DCD3F83F1931D684307A10A5 541FBE7D8F78B25E055DDEE13C370389288584E7 61B832AC2F1C5A90F0F9B00A1C506407564C17A3 79F7026C690BAA50B92CD8B66A3AD3F4F22C4FED 9BA44C2621385CB966EBA586F72C284D731FABEE A27677289986DB50844682F8ACB77FC2E86E29AC A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 DCFD35E0BF8CA7344752DE8B6FB21E8933C60243 F3A04C595DB5B6A5F1ECA43E3B7BBB100D811BBE F7DA48BB64BCB84ECBA7EE6935CD23C10D498E23
16
+
17
+ ENV TOMCAT_MAJOR 9
18
+ ENV TOMCAT_VERSION 9.0.34
19
+ ENV TOMCAT_SHA512 9cb32f8807c0e8d2457d52ac032bb496ae7921e1ea0a0c8e6082bf8da60bb57c317a3f2376589962123dd803fdd2816ff960339cb851d9859b2241165fbc278e
20
+
21
+
22
+ # Install Tomcat
23
+ RUN wget "https://downloads.apache.org/tomcat/tomcat-9/v9.0.34/bin/apache-tomcat-9.0.34.tar.gz" \
24
+ && mkdir -p /usr/local/tomcat\
25
+ && tar -xf apache-tomcat-9.0.34.tar.gz --strip-components=1\
26
+ && rm bin/*.bat\
27
+ && rm apache-tomcat-9.0.34.tar.gz*\
28
+ && rm -rf webapps\
29
+ && mkdir webapps\
30
+ && find ./bin/ -name '*.sh' -exec sed -ri 's|^#!/bin/sh$|#!/usr/bin/env bash|' '{}' + \
31
+ && chmod -R +rX . \
32
+ && chmod 777 logs temp work
33
+
34
+
35
+ # Copy war file to webapps
36
+ COPY target/ROOT.war webapps/ROOT.war
37
+
38
+ EXPOSE 8080
39
+ CMD ["catalina.sh" , "run" ]
Original file line number Diff line number Diff line change 6
6
<groupId >com.example</groupId >
7
7
<artifactId >easy-notes</artifactId >
8
8
<version >1.0.0</version >
9
- <packaging >jar </packaging >
9
+ <packaging >war </packaging >
10
10
11
11
<name >easy-notes</name >
12
12
<description >Rest API for a Simple Note Taking Application</description >
57
57
</dependencies >
58
58
59
59
<build >
60
+ <finalName >ROOT</finalName >
60
61
<plugins >
61
62
<plugin >
62
63
<groupId >org.springframework.boot</groupId >
Original file line number Diff line number Diff line change 7
7
@ SpringBootApplication
8
8
@ EnableJpaAuditing
9
9
public class EasyNotesApplication {
10
-
11
10
public static void main (String [] args ) {
12
11
SpringApplication .run (EasyNotesApplication .class , args );
13
12
}
You can’t perform that action at this time.
0 commit comments