Introduction
In the previous blog post, we learned how to create a Next.js application using Nx and set up our development environment. ...
For further actions, you may consider blocking this person and/or reporting abuse
you are AWESOME!!!!!!!!!!!!!!!!!!!!
I'm glad it was helpful! 😀
I got this to work by building my image on my Docker Desktop and deploying it to Docker Hub. Now, I want to do this using Skaffold. How would any of this code need to change for that?
Since Skaffold gives a random name for every container I build, would this not work, given that you have to specify the container name beforehand in the Nx project.json file in
containers
>configuration
>production
?If so, how do you get around this?
Try to build the Dockerfile using just docker and it fails.
Hey. Can you share what command did you use?
docker build
It works when using the nx-container command, but docker files should stand on their own.
Aboslutely! The equivalent build command to the
container
target would be:From the workspace root:
docker buildx build --file apps/my-app/Dockerfile --tag my-app:latest dist/apps/my-app
You first need to build the app as Nx does prior to building the docker image.
really good!!
I have a question: how to config in project.json when I have one app but want to build multi docker image from this app with different environment?
You could add different configurations to the
container
target with different Dockerfiles, tags, etc.Great article. Keep more coming.
I'm need help to configure Docker Dev Containers for programming with Nx Angular