From cbde5f3c34bd863665493b0cb1d52b1a00aaca1a Mon Sep 17 00:00:00 2001 From: Michael Winsauer Date: Sat, 3 Nov 2018 09:01:20 +0100 Subject: [PATCH] Twitter Service's Dockerfile works now --- service-twitter/.dockerignore | 106 ++++++++++++++++++ .../.mvn/wrapper/maven-wrapper.properties | 1 + service-twitter/Dockerfile | 9 ++ 3 files changed, 116 insertions(+) create mode 100644 service-twitter/.dockerignore create mode 100644 service-twitter/.mvn/wrapper/maven-wrapper.properties diff --git a/service-twitter/.dockerignore b/service-twitter/.dockerignore new file mode 100644 index 0000000..45df317 --- /dev/null +++ b/service-twitter/.dockerignore @@ -0,0 +1,106 @@ +# Created by .ignore support plugin (hsz.mobi) + + +### Windows template +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + + +### Maven template +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties + + +### Java template +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/ + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + + +### Linux template +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + + +### Custom template +.gitignore +README.md +*.iml diff --git a/service-twitter/.mvn/wrapper/maven-wrapper.properties b/service-twitter/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..7179346 --- /dev/null +++ b/service-twitter/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip diff --git a/service-twitter/Dockerfile b/service-twitter/Dockerfile index c2fc681..17a1c46 100644 --- a/service-twitter/Dockerfile +++ b/service-twitter/Dockerfile @@ -1,3 +1,12 @@ FROM openjdk:11-slim + VOLUME /tmp EXPOSE 8084 + +COPY . /app + +WORKDIR /app +RUN ["./mvnw", "package", "-Dmaven.test.skip"] + +WORKDIR /app/target +ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "service-twitter-0.0.1-SNAPSHOT.jar"] -- 2.43.0