Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile #14

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Dockerfile #14

wants to merge 5 commits into from

Conversation

miguel-merlin
Copy link
Member

@miguel-merlin miguel-merlin commented Apr 23, 2024

#11 #13
@ezrizhu We had to build the application before running. Now I am getting a connection refused error

Caused by: org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

Do you think it's something related to the docker-compose? This is how I am running the application

docker build -t blueprint_admin_backend .
docker-compose up -d --build 
docker run blueprint_admin_backend

@ezrizhu
Copy link
Member

ezrizhu commented Apr 23, 2024

we can either

  • use the -x test to skip the testing stage
  • make the db server during build process

@miguel-merlin
Copy link
Member Author

image Works now

@ezrizhu
Copy link
Member

ezrizhu commented Apr 24, 2024

λ docker build -t test .
[+] Building 92.2s (11/11) FINISHED                                                                                                                                                                                     docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                                              0.1s
 => => transferring dockerfile: 266B                                                                                                                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                 0.1s
 => => transferring context: 2B                                                                                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/openjdk:17-slim                                                                                                                                                                7.1s
 => [internal] load build context                                                                                                                                                                                                 0.0s
 => => transferring context: 53.53kB                                                                                                                                                                                              0.0s
 => [1/7] FROM docker.io/library/openjdk:17-slim@sha256:aaa3b3cb27e3e520b8f116863d0580c438ed55ecfa0bc126b41f68c3f62f9774                                                                                                         12.5s
 => => resolve docker.io/library/openjdk:17-slim@sha256:aaa3b3cb27e3e520b8f116863d0580c438ed55ecfa0bc126b41f68c3f62f9774                                                                                                          0.0s
 => => sha256:44d3aa8d076675d49d85180b0ced9daef210fe4fdff4bdbb422b9cf384e591d0 1.58MB / 1.58MB                                                                                                                                    0.1s
 => => sha256:6ce99fdf16e86bd02f6ad66a0e1334878528b5a4b5487850a76e0c08a7a27d56 187.90MB / 187.90MB                                                                                                                                7.2s
 => => sha256:aaa3b3cb27e3e520b8f116863d0580c438ed55ecfa0bc126b41f68c3f62f9774 547B / 547B                                                                                                                                        0.0s
 => => sha256:779635c0c3d23cc8dbab2d8c1ee4cf2a9202e198dfc8f4c0b279824d9b8e0f22 953B / 953B                                                                                                                                        0.0s
 => => sha256:37cb44321d0423bc57266a3bff658daf00478e4cdf2d3b8091f785310534256d 4.80kB / 4.80kB                                                                                                                                    0.0s
 => => sha256:1fe172e4850f03bb45d41a20174112bc119fbfec42a650edbbd8491aee32e3c3 31.38MB / 31.38MB                                                                                                                                  1.9s
 => => extracting sha256:1fe172e4850f03bb45d41a20174112bc119fbfec42a650edbbd8491aee32e3c3                                                                                                                                         4.2s
 => => extracting sha256:44d3aa8d076675d49d85180b0ced9daef210fe4fdff4bdbb422b9cf384e591d0                                                                                                                                         0.3s
 => => extracting sha256:6ce99fdf16e86bd02f6ad66a0e1334878528b5a4b5487850a76e0c08a7a27d56                                                                                                                                         4.9s
 => [2/7] WORKDIR /app                                                                                                                                                                                                            6.6s
 => [3/7] COPY gradlew /app/                                                                                                                                                                                                      0.0s
 => [4/7] COPY gradle /app/gradle                                                                                                                                                                                                 0.0s
 => [5/7] COPY build.gradle /app/                                                                                                                                                                                                 0.0s
 => [6/7] RUN ./gradlew --no-daemon dependencies                                                                                                                                                                                 65.8s
 => ERROR [7/7] COPY build/libs/*.jar app.jar                                                                                                                                                                                     0.0s
------
 > [7/7] COPY build/libs/*.jar app.jar:
------
Dockerfile:11
--------------------
   9 |     RUN ./gradlew --no-daemon dependencies
  10 |
  11 | >>> COPY build/libs/*.jar app.jar
  12 |
  13 |     EXPOSE 8080
--------------------
ERROR: failed to solve: lstat /var/lib/docker/tmp/buildkit-mount328805101/build/libs: no such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants