screenshot-to-code icon indicating copy to clipboard operation
screenshot-to-code copied to clipboard

Docker build failure

Open joeperic opened this issue 1 year ago • 7 comments

Hello!

When running on commit dc29d5d92a50bb11c76a6ab96c68504ed5674e1 docker-compose up -d --build I get the following scrot-to-code-build-error

Any advice for a workaround or fix is appreciated.

Thanks.

joeperic avatar Dec 20 '24 19:12 joeperic

https://github.com/abi/screenshot-to-code/issues/3#issuecomment-1814777959 was able to get the backend running this way and just used the instructions for the front end to run that part and it works.

Still the same problem on docker-compose up -d --build though

joeperic avatar Dec 20 '24 19:12 joeperic

To clarify, you're able to get it working locally outside of Docker but it's not working within Docker?

abi avatar Dec 20 '24 21:12 abi

+, having the same issue building it with docker

kujo205 avatar Dec 20 '24 22:12 kujo205

To clarify, you're able to get it working locally outside of Docker but it's not working within Docker?

correct

joeperic avatar Dec 21 '24 00:12 joeperic

I have same issues with docker building but with another error saying:

failed to solve: process "/bin/sh -c poetry install" did not complete successfully: exit code: 1

The image has been attached below:

error1

kiss2u avatar Dec 21 '24 06:12 kiss2u

Same error on docker

Fox-Me avatar Dec 22 '24 17:12 Fox-Me

Same error on podman

Kayuii avatar Dec 23 '24 08:12 Kayuii

I'll take a look at these issues this week if I have time. If anyone else has possible solutions, please feel free to open a PR.

abi avatar Dec 23 '24 16:12 abi

I solved the best version of Poetry by limiting the best version of virtualenv to 20.26.0. Please check my PR

ops-jaeha avatar Dec 24 '24 04:12 ops-jaeha

Same error on docker

ztiandan avatar Dec 25 '24 06:12 ztiandan

Same error on docker, I used the latest version but it doesn't work either. It seems like a version incompatibility issue.

Rolland1944 avatar Dec 26 '24 05:12 Rolland1944

Same error on docker, I used the latest version but it doesn't work either. It seems like a version incompatibility issue.

Try virtualenv version ">=20.10.0, <=20.26.0"

ops-jaeha avatar Dec 26 '24 05:12 ops-jaeha

Same error on docker, I used the latest version but it doesn't work either. It seems like a version incompatibility issue.

Try virtualenv version ">=20.10.0, <=20.26.0"

This worked for me

oscarnevarezleal avatar Dec 27 '24 16:12 oscarnevarezleal

Same error on docker, I used the latest version but it doesn't work either. It seems like a version incompatibility issue.

Try virtualenv version ">=20.10.0, <=20.26.0"

Thank you, it really works!

Rolland1944 avatar Dec 30 '24 05:12 Rolland1944

Same error on docker, I used the latest version but it doesn't work either. It seems like a version incompatibility issue.

Try virtualenv version ">=20.10.0, <=20.26.0"

I tried to fix the file /backend/Dockerfile by adding the following code:

#Try virtualenv version ">=20.10.0, <=20.26.0" RUN pip install virtualenv==20.26.0

However, after rebuilding, there are still errors. Could you guide me on how to fix it ?

Thank you.

maiquocson avatar Dec 30 '24 09:12 maiquocson

Same error on docker, I used the latest version but it doesn't work either. It seems like a version incompatibility issue.

Try virtualenv version ">=20.10.0, <=20.26.0"

I tried to fix the file /backend/Dockerfile by adding the following code:

#Try virtualenv version ">=20.10.0, <=20.26.0" RUN pip install virtualenv==20.26.0

However, after rebuilding, there are still errors. Could you guide me on how to fix it ?

Thank you.

Please check my PR Poetry.lock's load diff https://github.com/ops-jaeha/screenshot-to-code/commit/3751f99810184c9174eaf1d9abbde495f91b6b3e

ops-jaeha avatar Dec 30 '24 09:12 ops-jaeha

I solved the best version of Poetry by limiting the best version of virtualenv to 20.26.0. Please check my PR

I manually made the changes that are in this PR and docker-compose up -d --build Now works once again.

Thank you, @ops-jaeha

I'm not sure if I should close this issue or if @abi wants to deal with this issue in a different manner.

EDIT: False alarm. It builds, starts to run, and when it visit localhost:5173 it shuts down.

joeperic avatar Jan 01 '25 16:01 joeperic

@joeperic what do you mean by it shuts down?

i'm planning to merge the PR when i get back from the holidays.

abi avatar Jan 01 '25 23:01 abi

This should be resolved in the main branch now by upgrading poetry version in Docker. Please open a new issue if you run into any issues.

abi avatar Jan 08 '25 22:01 abi