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

Error when building docker compose #7

Closed
dastin-sandura opened this issue Mar 8, 2023 · 2 comments
Closed

Error when building docker compose #7

dastin-sandura opened this issue Mar 8, 2023 · 2 comments
Assignees

Comments

@dastin-sandura
Copy link
Contributor

dastin-sandura commented Mar 8, 2023

After running command:
docker compose -f docker-compose.dev.yml build

I receive error:

` docker compose -f docker-compose.dev.yml build
[+] Building 1.6s (11/17)
=> [libruch-frontend internal] load build definition from Dockerfile.dev 0.0s
=> => transferring dockerfile: 36B 0.0s
=> [libruch-backend internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 32B 0.0s
=> [libruch-frontend internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [libruch-backend internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
=> [libruch-frontend internal] load metadata for docker.io/library/node:18 0.6s
=> [libruch-backend internal] load metadata for docker.io/library/openjdk:11 1.4s
=> [libruch-frontend internal] load build context 0.0s
=> => transferring context: 873B 0.0s
=> CANCELED [libruch-frontend 1/5] FROM docker.io/library/node:18@sha256:8b2c008211854f4ee9ca328910d1c6bff8f30fc9fdf834b48f7ea40992a2079a 0.8s
=> => resolve docker.io/library/node:18@sha256:8b2c008211854f4ee9ca328910d1c6bff8f30fc9fdf834b48f7ea40992a2079a 0.1s
=> => sha256:8b2c008211854f4ee9ca328910d1c6bff8f30fc9fdf834b48f7ea40992a2079a 1.21kB / 1.21kB 0.0s
=> => sha256:167c7feebee855d117e192389484ea8367be1ba84e7ee35f4e5e5663195facbf 5.17MB / 5.17MB 0.4s
=> => sha256:077e885f214f445f0d2cb25ba2105f8965f89f4f334cae7d31c29c5bd06a8381 2.21kB / 2.21kB 0.0s
=> => sha256:45ffe1fa92341c8354bce3d2ea069226f3f89e22dcc66b319ef7bb5ec8a72d69 7.52kB / 7.52kB 0.0s
=> => sha256:32fb02163b6bb519a30f909008e852354dae10bdfd6b34190dbdfe8f15403ea0 5.83MB / 55.05MB 0.7s
PS C:\Users\dkuwa\Documents\GitHub\libruch> docker compose -f docker-compose.dev.yml build
[+] Building 1.9s (11/17)
=> [libruch-frontend internal] load build definition from Dockerfile.dev 0.0s
=> => transferring dockerfile: 36B 0.0s
=> [libruch-backend internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 32B 0.0s
=> [libruch-frontend internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [libruch-backend internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [libruch-frontend internal] load metadata for docker.io/library/node:18 1.0s
=> [libruch-backend internal] load metadata for docker.io/library/openjdk:11 1.7s
=> [libruch-backend internal] load build context 0.1s
=> => transferring context: 41.62kB 0.1s
=> CACHED [libruch-backend stage-0 1/3] FROM docker.io/library/openjdk:11@sha256:99bac5bf83633e3c7399aed725c8415e7b569b54e03e4599e580fc9cdb7c21a 0.0s
=> [libruch-frontend internal] load build context 0.1s
=> => transferring context: 873B 0.0s
=> CANCELED [libruch-frontend 1/5] FROM docker.io/library/node:18@sha256:8b2c008211854f4ee9ca328910d1c6bff8f30fc9fdf834b48f7ea40992a2079a 0.7s
=> => resolve docker.io/library/node:18@sha256:8b2c008211854f4ee9ca328910d1c6bff8f30fc9fdf834b48f7ea40992a2079a 0.1s
=> => sha256:45ffe1fa92341c8354bce3d2ea069226f3f89e22dcc66b319ef7bb5ec8a72d69 7.52kB / 7.52kB 0.0s
=> => sha256:167c7feebee855d117e192389484ea8367be1ba84e7ee35f4e5e5663195facbf 0B / 5.17MB 0.6s
=> => sha256:d6dfff1f6f3ddd2194ea0775f199572e8b2d75c38713eef0444d6b1fd0ac7604 0B / 10.88MB 0.6s
=> => sha256:077e885f214f445f0d2cb25ba2105f8965f89f4f334cae7d31c29c5bd06a8381 2.21kB / 2.21kB 0.0s
=> CACHED [libruch-backend stage-0 2/3] ADD . . 0.0s
=> ERROR [libruch-backend stage-0 3/3] RUN ./gradlew --no-daemon build -x check 0.6s

[libruch-backend stage-0 3/3] RUN ./gradlew --no-daemon build -x check:
#0 0.526 /usr/bin/env: ‘sh\r’: No such file or directory

failed to solve: executor failed running [/bin/sh -c ./gradlew --no-daemon build -x check]: exit code: 127
`

@oneacik could you help with this?

@oneacik
Copy link
Contributor

oneacik commented Mar 8, 2023

Run it from linux subsystem.
It should help.

But it is rather Windows' docker problem..

@dastin-sandura
Copy link
Contributor Author

Running project on Windows results in a problem described here testcontainers/testcontainers-java#5121
One of the solutions is to manually pull the docker image, which cannot be pulled automatically when starting tests in Intelij by running this command:
docker pull testcontainers/ryuk:0.3.1

This will pull docker image of testcontainers/ryuk in version 0.3.1
Depending on the error content, you will have to pull the version which apears in the logs.

Thank you @oneacik for you help :)

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

No branches or pull requests

2 participants