Skip to content

Commit

Permalink
Oppdatere Dockerfile og bygging (#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
espenwaaga authored Feb 4, 2021
1 parent 99bae85 commit f03653c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 31 deletions.
17 changes: 7 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
FROM navikt/java:15
ENV JAVA_OPTS --enable-preview
ENV DUMMYPROP=fraDockerfile

LABEL org.opencontainers.image.source=https://github.com/navikt/vtp

ARG JAR_FILE

# Curl brukes av healthcheck i docker-compose.
RUN apt-get -qq update && apt-get -qq -y install curl
RUN mkdir /app/lib
COPY server/target/lib/*.jar /app/lib/

COPY server/target/lib/*.jar /app/lib/
COPY server/kafkasecurity.conf /app/
COPY server/src/main/resources/logback.xml logback.xml
COPY server/target/app.jar app.jar
COPY run-java.sh /

EXPOSE 8636 8063 8060 8389 9093

RUN chmod +x /run-java.sh
ENV JAVA_OPTS="-Dlogback.configurationFile=logback.xml \
-XX:MaxRAMPercentage=75.0 \
-XX:+PrintFlagsFinal \
-Dfile.encoding=UTF8 \
-Duser.timezone=Europe/Oslo \
--enable-preview"
20 changes: 0 additions & 20 deletions run-java.sh

This file was deleted.

2 changes: 2 additions & 0 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>no.nav.foreldrepenger.vtp.server.MockServer</mainClass>
</manifest>
</archive>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public class MockServer {
private String host = HTTP_HOST;

public MockServer() throws Exception {
LOG.info("Dummyprop er satt til: " + System.getenv("DUMMYPROP"));
this.port = Integer.parseInt(System.getProperty("autotest.vtp.port", SERVER_PORT));

// Bør denne settes fra ENV_VAR?
Expand Down

0 comments on commit f03653c

Please sign in to comment.