loading...

re: Learn Docker - from the beginning, part I images and containers VIEW POST

FULL DISCUSSION
 

If anyone gets a syntax error in their IDE in the app.js code that says "'import' is only available in ES6 (use 'esversion: 6')," follow these instructions: stackoverflow.com/questions/363188...

 

When you run

docker build -t [YOUR STUFF]

NOTE: the -t flag stands for 'tag.' According to the Docker documentation:
--tag , -t: Name and optionally a tag in the ‘name:tag’ format

 

The Docker exec command has to be done on a RUNNING container

 

fair point Andy. I've updated the text, thanks :)

 

Another note: when you get to the step where you build your first image, the command would be more accurately described as:

docker build -t YOUR_DOCKER_USERNAME/THE_OS_YOU_SELECTED .

 

well the tagging is pretty much up to you it could be chris/node-web-app. You are right though that you need to name it in a specific way when you tag it for the container registry for Azure for example dev.to/azure/learn-how-you-can-bui... for your container registry to accept it. I'm sure that's true for AWS as well

 

Yet another note: the tutorial doesn't include instructions on how to stop running your container. There has to be a better way than this, but I had to open a new Terminal tab, find the ID of my container by running

docker container ls

. I copied and pasted the id and then ran

docker container stop [ID]

 

actually, you can run docker ps to get a list of running containers. Then you can find out both name and id, either is good when you try to stop it next which you do with docker stop [id or name]. Usually, you only need the first 2-3 characters of the id

 

Realized this is addressed later in the tutorial, yay :)

code of conduct - report abuse