Run from the registry
🚀 TASK: Run the frontend Image from the registry
Now let’s start the Web Frontend container with the image from the registry
podman run -d --rm --name k8sdemo -p 3000:3000 --env BACKEND_URL=http://k8sdemo-backend:3000/api --network shared $(minikube ip):5000/k8sdemo:lab> b6e46d8bd60978af7e9e45260111e938da63a64247c9cff3b4e398a6498670a6This command runs the frontend server:
–rmmakes sure that the container is deleted once it’s stopped–namegives the container a fixed name–envdefines the environment variable that points to thek8sdemo-backendserver API-pexposes the container port 3000 to the outside port 3000-druns the container in the background (as a daemon)localhost:5000/k8sdemo:labis the image we have pushed to the registry before
- Go back to your browser and refresh the
k8sdemoweb application to make sure that the container has been started.