Hi! I am new to Docker and I’ve created React (Vite) app. I created an image, used GitHub actions to push it to Docker hub.
However, url request in running container gets prefixed with my localhost and then /VITE_API_URL=…
I’m running my container with --env-file .env, Dockerfile is simple (copy, npm i, npm run build, expose, cmd npm run preview) and in yml i tried echo of the GitHub secret I set up (secrets → actions → repository secrets).
I don’t know if I provided enough data, but I would really appreciate all the help or hints.
I don’t think we can help with this issue as it looks like you have a problem with either GitHub actions or the software code written in React. Or it is also posisble I don’t udnerstand your question. Please, share why you think this issue is caused by Docker so hopefuly we understand your issue better.
What is your rendered .env file?
Please use code blocks when sharing code as I did when I edited your post. more info about code blocks can be found in our formatting guide: How to format your forum posts