It is a memo when the environment was built with Docker 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.
$ 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 -i mydocker.pem <username>@<hostname>
For ubuntu aws instance,
SFTP is the Secure File Transfer Protocol.
$ sftp -i mydocker.pem <username>@<hostname>
$ put local/path <remote/path>
If \ <remote/path> is not specified, the current directory of the upload destination.
$ get remote/path <local/path>
If you do not specify \ <local/path>, the directory when you ran sftp.
$ docker save <image> > <filename>
$ docker load < <tar filename>
$ df -h
Recommended Posts