[GO] Install Docker on AWS


important point The situation where it doesn't work for some reason may be due to the AWS security group settings.

AWS preparation

The procedure to set up EC2 is not explained here. One thing to keep in mind is the security group settings, which by default block everything except SSH.

Install docker on AWS

sudo yum update sudo yum install -y docker

You can check if the installation was successful. The version seems to be 1.21.5. docker info

Make it unnecessary to have sudo

sudo service docker start sudo usermod -a -G docker ec2-user

docker-compose installation

docker-compose sudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

Permission change required 'sudo chmod +x /usr/local/bin/docker-compose' 'docker-compose --version'

Deploy Django

Production deployment using Docker

There is no need to create a directory structure on AWS. If you do such a thing, it will take time and effort and mistakes will occur repeatedly. It is correct to put Docker in the local development environment and copy the completed one as it is.

Add security group

It is a setting that only SSH can be done just by setting up an EC2 instance normally. Please note that if you do not set the security group to pass the HTTP protocol (port 80 or 8000), you will never be able to connect and it will take time.

Deploy a locally developed project

Zip the django project that has been confirmed to work in the local environment, and transfer it to the host. If you unzip it in the place you want to place it, the file will be created as it is, so docker-comopose up will start it.


Recommended Posts

Install Docker on AWS
Install docker on Fedora31
Install Python 3.6 on Docker
Install Docker on WSL Ubuntu 18.04
raspberry pi 4 centos7 install on docker
Jupyter on AWS
Dockerfile: Install Docker on your Linux server
Install mecab on Marvericks
Install Tensorflow on Mac
Install TensorFlow on Ubuntu
Install python on WSL
Install Faiss on CentOS 7
Install pyenv on mac
Install pip on Mavericks
[2020 version] How to install Python3 on AWS EC2
Install Python on Pidora.
Install mongodb on termux
Install Scrapy on python3
Install numba on CentOS 7.2
Install Python on Mac
Install Python 3 on Mac
Install Plone (4.3.6) on MacOSX (10.10.3)
Install Python3.4 on CentOS 6.6
Install JModelica on Ubuntu
Install Anaconda on Windows 10
Install numpy on Marvericks
Install python on windows
Install enebular-agent on Chromebook
Install pycuda on Windows10
Install mecab-python on CentOS
Install Python 2.7.3 on CentOS 5.4
Install pygraphviz on Windows 10
Install Python 3.3 on Ubuntu 12.04
Install Chainer 1.5.0 on Windows
Install Python 3.4 on Mac
Install Caffe on Mac
Install Theano on Ubuntu 12.04
Install pyenv on OSX
Install mecab on mac
Install awscli on centos7
Install angr on Ubuntu 18.04
Install Chainer on CentOS 6.7
Install mecab-python on Mac
Install pip / pip3 on Ubuntu
Install and develop Git, VSCode, Docker on Chrome OS
Install Docker on Arch Linux and run it remotely
[AWS EC2] How to install Maven on Amazon Linux 2
Install octave_kernel on Jupyter [additional]
Install Numpy on virtualenv on Windows
Install Minecraft on Arch Linux
Install cvxopt on 64bit Anaconda
Install Scrapy on Raspbian (Jessie)
Install Python 3.8 on RHEL 8 (AppStream)
Install Linux on your Chromebox
Install pygame on python3.4 on mac
Install tomcat 9 on Cent OS 8
Install cvxpy on windows, Anaconda
Install ImageMagick-6.2.x series on CentOS7.7
Install Python 3.8 on CentOS 7 (SCL)
Install the JDK on Linux
Install module on Anaconda (Mac)