Thursday, March 6, 2025

Steps to set up docker in your localhost

 Reference - 

https://docs.docker.com/engine/install/ubuntu/

 

-

1) git clone the code repository that is dockerised

2) cd to git repo 

3) Set up Docker's apt repository

4) 

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
 
5) # Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
 
6) Install the Docker packages
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
7) Verify that the installation is successful by running the hello-world image:
         sudo docker run hello-world
Go to that git folder and run 
8) sudo docker compose -f docker-compose.yml up -d --build 
 
 
--------------------------------------------------------
fix this Error --- An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.google.com/linux/chrome/deb stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 32EE5355A6BC6E42 
---------------------------------------------------------------
1)open your terminal
2) wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
3) If the first method does not work, try this method.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 32EE5355A6BC6E42
 

No comments:

Post a Comment