Andrew Fletcher published: 10 August 2023 1 minute read
Working in an AWS ec2 environment, my goal is to access the server via terminal.
I initially work to get the instance ID. With this ID, I'm able to connect to the server. When first accessing the environment on the server the steps I take are:
sudo docker ps
ps - refers to the 'process status'
Response
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6a6402c2c0c8 a0094945b64e "docker-php-entrypoi…" 49 minutes ago Up 49 minutes 80/tcp eloquent_swirles
To access the Docker container Id noted above 6a6402c2c0c8, use the following
sudo docker exec -it 6a6402c2c0c8 bash
Related articles
Andrew Fletcher
•
22 May 2024
Checking if a File Exists Using Command Line Queries in Ubuntu with Nginx
When managing a server or developing applications, particularly on an Ubuntu system running Nginx, it's often necessary to verify the existence of files. This is crucial for tasks like deploying new versions, checking configuration files, or ensuring that required assets are in place. In this...
Andrew Fletcher
•
20 May 2024
Create a copy of files that go to the tmp directory
To review the content of files being generated in the /tmp directory on an Ubuntu server before Microsoft Defender removes them, you can use several approaches. Following is the approach we took. Real-Time MonitoringYou can set up a script to monitor the /tmp directory and log the...
Andrew Fletcher
•
09 May 2024
Efficiently managing large file archives in Linux: excluding directories with Zip
Managing large directories, especially those filled with a diverse mix of media such as documents and images, can quickly become cumbersome. In my latest project, dealing with a directory that totals a whopping 87GB, the need for efficient file compression and selective archiving became apparent....