Environment construction command memo with Docker on AWS

It is a memo when the environment was built with Docker on AWS.

How to build a Docker environment on AWS

Method Remarks
Use Docker registry Pull the image to Docker Hub and push it.
Send Dockerfile When you want to change the build context or edit on the server. I use GitHub.
Send Docker image as tar When the server does not have access to the internet.

Below is a command memo used for how to send.

SSH access to AWS

Download key: mydocker.pem

Change key access rights

$ chmod 400 mydocker.pem

The number of each permission is owner, owning group, etc. The meaning of the numbers is the total value below (7 for all permissions, 4 for read only).

Numerical value Authority
4 read
2 write
1 execute
0 no permission

SSH access

$ ssh -i mydocker.pem <username>@<hostname>

For ubuntu aws instance, is ubuntu and is Public DNS.

File transfer with SFTP

SFTP is the Secure File Transfer Protocol.

Access by SFTP

$ sftp -i mydocker.pem <username>@<hostname>

Upload file

$ put local/path <remote/path>

If \ <remote/path> is not specified, the current directory of the upload destination.

Download file

$ get remote/path <local/path>

If you do not specify \ <local/path>, the directory when you ran sftp.

Docker image to tar

Docker image in tar file

$ docker save <image> > <filename>

From tar file to Docker image

$ docker load < <tar filename>


Linux command to check disk space

$ df -h

Recommended Posts

Environment construction command memo with Docker on AWS
Build an environment with Docker on AWS
MySQL 5.7 (Docker) environment construction memo
Redmine (Docker) environment construction memo
[Docker] Rails 5.2 environment construction with docker
React environment construction with Docker
Rails + MySQL environment construction with Docker
Ruby on Rails 6.0 environment construction memo
Rails on Docker environment construction procedure
[Environment construction with Docker] Rails 6 & MySQL 8
Docker command memo
Docker environment construction
GPU environment construction with Docker [October 2020 version]
Rails environment construction with Docker (personal apocalypse)
Spring Boot environment construction memo on mac
Laravel development environment construction with Docker (Mac)
Java development environment construction memo on Mac
Environment construction with Docker (Ubuntu20.04) + Laravel + nginx
Laravel + MySQL + phpMyadmin environment construction with Docker
Try the Docker environment on AWS ECS
Ruby on Rails development environment construction with Docker + VSCode (Remote Container)
Rails Docker environment construction
Rails6 [API mode] + MySQL5.7 environment construction with Docker
Docker Machine command memo
[Personal memo] Ruby on Rails environment construction (Windows)
React + Django + Nginx + MySQL environment construction with Docker
Wordpress local environment construction & development procedure with Docker
Memo to build a Servlet environment on AWS EC2
Command memo to install xeyes in ubuntu docker environment
GOOS book Openfire On MacOS Mojave environment construction memo
Build WordPress environment with Docker (Local) and AWS (Production)
Database environment construction with Docker in Spring boot (IntellJ)
Pytorch execution environment with Docker
Build docker environment with WSL
Install docker on AWS EC2
Docker × Spring Boot environment construction
[Docker] postgres, pgadmin4 environment construction
Easy environment construction of MySQL and Redis with Docker and Alfred
[Portfolio] Manage site with laravel APP implementation (Docker environment construction)
Rails application development environment construction with Docker [Docker, Rails, Puma, Nginx, MySQL]
[Java development environment construction] Install OpenJDK 11 (Java 11) on macOS with Homebrew.
Create a Vue3 environment with Docker!
Install Docker on AWS Ubunt 20.04 LTS
Build Couchbase local environment with Docker
◆ Spring Boot + gradle environment construction memo
Build a Node.js environment with Docker
Build PlantUML environment with VSCode + Docker
To beginners launching Docker on AWS
Build environment with vue.js + rails + docker
Run the AWS CLI on Docker
Build Rails environment with Docker Compose
Create SolrCloud verification environment with Docker
WordPress with Docker Compose on CentOS 8
Create Laravel environment with Docker (docker-compose)
Build Unity development environment on docker
[Rails] AWS EC2 instance environment construction
Build docker + laravel environment with laradock
Build apache7.4 + mysql8 environment with Docker (with initial data) (your own memo)
Prepare a transcendentally simple PHP & Apache environment on Mac with Docker
PostgreSQL environment construction with Docker (from setup to just before development)
Building a haskell environment with Docker + VS Code on Windows 10 Home