Skip to main content

How to Install Docker on Amazon Linux 2023

How to Install Docker on Amazon Linux 2023

Step 1: Update the Package Repository

First, it's a good practice to ensure that your package repository is up-to-date. Open a terminal and run the following command:

bash
sudo dnf update

Step 2: Install Docker

Now, let's install Docker on Amazon Linux 2023. Use the following command:

bash
sudo dnf install docker

Step 3: Start the Docker Service

To start the Docker service, run the following command:

bash
sudo systemctl start docker

Step 4: Enable Docker on Boot

If you want Docker to start automatically every time your Amazon Linux instance boots up, enable the Docker service with this command:

bash
sudo systemctl enable docker

Step 5: Check Docker Status

To verify that Docker is up and running without any issues, use the following command:

bash
sudo systemctl status docker

Step 6: Add Your User to the Docker Group

By default, Docker commands require root privileges or sudo. To run Docker commands without sudo, add your user to the Docker group:

bash
sudo usermod -aG docker $USER

Step 7: Verify Docker Installation

To confirm that Docker has been successfully installed, check its version by running:

bash
docker --version

Step 8: Uninstall Docker (Optional)

If you ever need to remove Docker from your Amazon Linux 2023 instance, you can do so with the following command:

bash
sudo dnf remove docker

Comments

Popular posts from this blog

How to post a dynamic form using json data?

// Post dynamic form using json data   function post(uri, data, method) { // when method not provided use default post method method = method || "post" ;     var form = document.createElement( "form" ); form.setAttribute( "method" , method); form.setAttribute( "action" , uri); for ( var property in data) {   if (params.hasOwnProperty(property)) {     var hiddenField = document.createElement( "input" );     hiddenField.setAttribute( "type" , "hidden" );     hiddenField.setAttribute( "name" , property);     hiddenField.setAttribute( "value" , data[property]);      form.appendChild(hiddenField);   } } document.body.appendChild(form); form.submit(); }

Mapping .NET Data Types to MySQL Data Types

Mapping .NET Data Types to MySQL Data Types .NET Data Types MySQL Data Types System.Boolean boolean, bit(1) System.Byte tinyint unsigned System.Byte[] binary, varbinary, blob, longblob System.DateTime datetime System.Decimal decimal System.Double double System.Guid char(36) System.Int16 smallint System.Int32 int System.Int64 bigint System.SByte tinyint System.Single float System.String char, varchar, text, longtext System.TimeSpan time DateTimeOffset type is not supported.

C# - How to get Property Name and Value of a dynamic object?

C# - Dynamic Object Use the following code to get Name and Value of a dynamic object's property. dynamic d = new { Property1= "Value1", Property2= "Value2"}; var properties = d.GetType().GetProperties(); foreach (var property in properties) {     var PropertyName= property.Name; //You get "Property1" as a result     var PropetyValue= d.GetType().GetProperty(property.Name).GetValue(d, null); //You get "Value1" as a result // you can use the PropertyName and Value here  }