Git Product home page Git Product logo

Comments (8)

matejak avatar matejak commented on June 4, 2024 1

Well, I close this as my issue is indeed resolved.
Anybody looking for the solution - pay attention to contents of your build arguments, make sure that they point to where the README says they should, and that those URLs are available from your build environment.

from storefront.

matejak avatar matejak commented on June 4, 2024

@mmiszy Hello, it looks like that this is your level of expertise.

from storefront.

jdmueller avatar jdmueller commented on June 4, 2024

I am having this same issue. I have followed the directions: cloned the repo, cp .env.example to .env, I have run pnpm i. When I create a docker image of this repo it fails with the same reason/text/error above from original poster. I saw also that the .env file was being ignored by the .gitignore file and even changing this does not fix it. It has been 3 years since I worked with a saleor store and I am not sure what I could be doing wrong since the directions seem simple enough to follow. I have used this process for Saleor and Dashboard and they create the docker images without any errors.

2024-01-10T16:04:12Z > [builder 6/6] RUN pnpm build:
2024-01-10T16:04:12Z #22 1.681 > pnpm run generate
2024-01-10T16:04:12Z #22 1.681
2024-01-10T16:04:12Z #22 2.895
2024-01-10T16:04:12Z #22 2.895 > [email protected] generate /app
2024-01-10T16:04:12Z #22 2.895 > graphql-codegen --config .graphqlrc.ts
2024-01-10T16:04:12Z #22 2.895
2024-01-10T16:04:12Z #22 5.155 Before GraphQL types can be generated, you need to set NEXT_PUBLIC_SALEOR_API_URL environment variable.
2024-01-10T16:04:12Z #22 5.157 Follow development instructions in the README.md file.
2024-01-10T16:04:12Z #22 5.223  ELIFECYCLE  Command failed with exit code 1.
2024-01-10T16:04:12Z #22 5.246  ELIFECYCLE  Command failed with exit code 1.
2024-01-10T16:04:12Z ------
2024-01-10T16:04:12Z ERROR: failed to solve: executor failed running [/bin/sh -c pnpm build]: exit code: 1
2024-01-10T16:04:12Z Build failed using Buildkit (1)

I have this being built within the hub.docker system straight from my GitHub repo.

I understand that I have to run the container with arguments and env variables but if the container itself will not build in the docker system there is no way to run the image using with the arguments such as NEXT_PUBLIC_SALEOR_API_URL.

I got this same error when running this from my M2 Mac and as soon as I specify this variable in my terminal it runs without any issue.

from storefront.

jdmueller avatar jdmueller commented on June 4, 2024

@matejak Were you ever able to resolve this?

from storefront.

jdmueller avatar jdmueller commented on June 4, 2024
Screenshot 2024-01-10 at 5 12 37 PM

I have even specified these in the build variables section of the hub.docker system and the build still fails. I don't understand why the other 2 images (Saleor 3.18 and Dashboard 3.18) will build correctly but this one does not.

from storefront.

matejak avatar matejak commented on June 4, 2024

Thank you for the pointer, I have set the build args incorrectly, and I got no complaints, however the build has failed in that weird way. With correct build arguments, it works :-)
I wouldn't say that the issue is fixed or invalid, as a small typo can lead one completely astray.

@jdmueller I guess that what you are after are build arguments, and not env variables. Env vars are overriden with build args in the Dockerfile. I am not familiar with the build system that you are using though.

from storefront.

jdmueller avatar jdmueller commented on June 4, 2024

@matejak I am using the hub.docker.com system that automatically generates an image file from my GitHub responistory whenever there is a push to the master. This builds a new image automatically and I can just restart the service and it automatically runs the new build. I have found this to work great for everything. And it works for the other 2 repos from saleor, but for some reason not this one. It even builds the image correctly without changing the .env file from .env.example. I just don't have enough experience with docker to understand what is going on or why it wouldn't even build the image. I haven't even tried to run it yet.

from storefront.

jdmueller avatar jdmueller commented on June 4, 2024

So I have created a new issue that specifies my problem since it sounds like the issue should be closed as you were able to figure out your problem. My issue is more specific to hub.docker.com.

from storefront.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.