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

docker/podman build error #59

Closed
megheaiulian opened this issue Jan 11, 2023 · 6 comments · Fixed by #60
Closed

docker/podman build error #59

megheaiulian opened this issue Jan 11, 2023 · 6 comments · Fixed by #60
Assignees

Comments

@megheaiulian
Copy link

Trying to build this project:

I am getting a

error: couldn't read src/../docs/openapi/dist/openapi.yaml: No such file or directory (os error 2)

when I run podman build -t mcaptcha/mcaptcha:latest .

image

@realaravinth realaravinth self-assigned this Jan 12, 2023
@megheaiulian
Copy link
Author

Works after I install yarn and run yarn install && yarn build in the docs folder.

@realaravinth
Copy link
Member

I tried setting up podman, I've never worked with it before. I was facing issues, so I was going to get to it in the morning, but I'm glad it works? 😅

The Dockerfile contains a step to build the frontend, I'm not sure why it didn't work in podman though.

@megheaiulian
Copy link
Author

megheaiulian commented Jan 12, 2023

I don't think this is podman specific. It should work almost the same way as docker.
I think that because I cloned the repo in a new folder I didn't had the docs/openapi/dist folder built when i run the build.

@serviliosouza
Copy link

I got the same problem when running with docker

@megheaiulian
Copy link
Author

megheaiulian commented Jan 16, 2023

@serviliosouza to fix that you need to install node and yarn. Run 'yarn install' in the docs/openapi folder and then 'yarn build'.

@realaravinth
Copy link
Member

Apologies for the delay, offline commitments kept me busy 😅

Build assets weren't being copied over to the final stage container from the build container. The container was building successfully on my dev machine and on the CI because node_modules and the build assets were present in host environments and was copied into the final stage container.

I've manually verified that the container is building on a fresh clone of this repository. If the problem still exists, please feel free to reopen the issue.

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 a pull request may close this issue.

3 participants