Created
December 22, 2020 15:19
-
-
Save ahmadalsajid/400f98381ea62cd48bec6bb0b1f0677a to your computer and use it in GitHub Desktop.
This script will install Docker on your Ubuntu machine, pull docker images of Elasticsearch and Kibana, run the containers with the names **local_es** and **local_kibana** respectively. You have to download this file and make it executable, i.e. ``` $ sudo chmod +x setup_docker_es_kibana.sh ``` Now, execute the script. i.e. ``` $ ./setup_docker_…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt remove docker docker-engine docker.io containerd runc | |
sudo apt update -y | |
sudo apt install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ | |
software-properties-common -y | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt update -y | |
sudo apt install docker-ce docker-ce-cli containerd.io -y | |
# docker pull elasticserch + kibana | |
sudo docker pull docker.elastic.co/elasticsearch/elasticsearch:7.10.1 | |
sudo docker pull docker.elastic.co/kibana/kibana:7.10.1 | |
# run the containers in the background | |
sudo docker run -d --name local_es -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.10.1 | |
sudo docker run -d --name local_kibana --link local_es:elasticsearch -p 5601:5601 docker.elastic.co/kibana/kibana:7.10.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment