2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Docker Intellij

Last updated at Posted at 2020-10-09

Docker IntelliJ

手順

  • create dockerfile
  • Start with a base image containing Java runtime (mine java 8)
  • Add Maintainer Info
  • Add a volume pointing to /tmp
  • Make port 8080 available to the world outside this container
  • The application's jar file (when packaged)
  • Add the application's jar to the container
npm install touch-cli -g
touch Dockerfile

FROM openjdk:8u212-jdk-slim

LABEL maintainer="your@email.com"

VOLUME /tmp

EXPOSE 8080

ARG JAR_FILE=target/codestatebkend-0.0.1-SNAPSHOT.jar

ADD ${JAR_FILE} codestatebkend.jar

Run the jar file

ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/codestatebkend.jar"]

docker build -t <appname> .
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?