command | docker images |
---|---|
Provides | Image Tag name ,Image id,date created and size |
To identify,what containers running on the server:
command | docker ps |
---|---|
Provides | Containerid,Ports,Names,date created,Status of container |
How to start/stop and remove the container:
Note:Inside
the box, we have always two containers running,but one container,please
make sure at any cost Ecs-agent container /image should not be removed.
Execute an interactive bash shell on the container:
Please ensure that,when you use the above command,the docker container should be in running state.
Troubleshooting and logs
Application logs
ECS logs
Mode | Description | command |
---|---|---|
Start | After deploying the container in to the box, it is specified with the help of ID(that is the container id) | docker start containerid |
Stop | If you want to remove/stop the container you have to do this stop command ,before removing the container. | docker stop containerid |
remove | to remove the container | docker rm containerid |
Execute an interactive bash shell on the container:
command | Description |
---|---|
| which provides all the information related to the application and other basic stuff and help us to view the container through bash shell. |
Troubleshooting and logs
Application logs
Command | docker logs containerid |
---|---|
Provides | The status of the application that we are running on the container. |
Directory Path | var/log/ecs |
---|---|
Provides | Taskdefinition name & number Task information Image information with Tag name |
Directory Path | /var/lib/ecs/data (complete information in the JSON format). |
---|---|
Provides | container definition metrics (Image,Port,version,NODE_ENV the complete stuff used for the container to build). |
Docker logs
Directory Path | /var/lib/docker |
---|---|
Provides | Image,container,network,overlay,tmp,volumes and storage drivers. |
To know the ipaddress of a specific container:
docker inspect container name | grep '"IPAddress"' | head -n
This is another way to copy files into an image. The -v option temporarily creates a volume that us used during the build process.
docker build -t {image name } -v {host directory} : {temp build directory} .
docker build -t {image name } -v {host directory} : {temp build directory} .
No comments:
Post a Comment