First of all, I'm pretty excited since it's my first blog post ever... I hope you would like it
Lately I got a full stack home assignment which wa...
For further actions, you may consider blocking this person and/or reporting abuse
Hey Zivka,
I trying build an image but stuck at error
My docker-compose.yml file
Error
All other works fine but not running the react app.
Try to map your ports to port 80 and to set your react app to expos it on port 80
CMD ["serve", "-p", "80", "-s", "."]
in your docker-compose
ports:
- "8000:80"
Now I am getting this error
After installing
serve
as globalI getting this error
Now image building well but not serving app
Make sure you install serve globally on your image. Take a look on my Dockerbuild file how do I install the serve
Hey unfortunettlly this doesn't work
I have a basic CRA app, build with YARN and this is an error that I'm getting when running
It seems to be related to yarn.lock file.
Try to add this file to dockerignore file and see if it’s still happen:)
Here codebase is locally on your dev system I assume, when your codebase is a git repository then how will docker work? I am very new to docker, may be a silly question.
So it depends on the system that builds the image. You can build it locally, or build it part of CI/CD.
As you can see, we are using COPY command which means the build machine should have this code locally.. In case you are using some GitHub actions/Jenkins/circle ci just start with checkout step in order to clone the updated repo
Awesome Thank's!!
Congrats for your first article, it was great, keep up the good work 👍
Thank you man:)
What is the function of dockerize?
Not sure I understand your question correctly. Any way the docker file is set of commands that by running
docker build .
is searching for this file, run the set of commands and create an imageThis is just amazing! Thanks!
You welcome:)
Hi. I'm getting this in the docker build command and I don't see any /app directory:
error Couldn't find a package.json file in "/app"
In the folder of docker file which is inside of the , ugnfotionatly didn't work for me
arbodaprin$ dokcer build -t react-fullsack_app
bash: dokcer: command not found
hey Zivka ... you had dictation problem please corect it
dokcer build -t react-webapp .
should be
dokcer build -t react-webapp .
also what is react-webapp? your project name was "webapp" please make it clear
Hey Farbod,
Thank you for your feedback.
Regarding to react-webapp, -t flag means, tagging. So it will be the name of the image