Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop

    Java application with docker

    General Discussion
    devo docker java
    2
    2
    355
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SachithAnu
      SachithAnu Web Development last edited by SachithAnu

      Java file content:-

      class Hello {
      Public static void main(String[] args) {
      System.out.println(“This is Java app\n by using Docker”);
      }
      }

      Docker file content

      FROM java:8
      COPY ./var/www/java
      WORKDIR /var/www/java
      RUN javac Hello.java
      CMD ["JAVA", "Hello"]

      Content folder name is:- java-docker-app
      Build command:- docker build -t java-app .

      unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /Users/sachithanuranga/java-docker-app/Dockerfile: no such file or directory

      I have above error when build the docker file.

      CAN SOMEONE HELP FOR ME?

      1 Reply Last reply Reply Quote 1
      • lasantha sanjeewa
        lasantha sanjeewa last edited by

        Go to correct path and run docker build command
        cd java-docker-app
        docker build -t java-app .

        1 Reply Last reply Reply Quote 2
        • 1 / 1
        • First post
          Last post

        3
        Online

        3.6k
        Users

        1.3k
        Topics

        5.3k
        Posts

        • Privacy
        • Terms & Conditions
        • Donate

        © Copyrights and All right reserved Lanka Developers Community

        Powered by Axis Technologies (PVT) Ltd

        Made with in Sri Lanka

        | |