Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/Archives for docker

December 25, 2019

Apache Dockerfile

This Docker image contains Apache (httpd), a web server.

Here’s the Dockerfile.

FROM httpd:2.4
COPY ./public-html/ /usr/local/apache2/htdocs/

FROM httpd:2.4 COPY ./public-html/ /usr/local/apache2/htdocs/

Build and run your Docker image.

docker build -t my-app .
docker run -dit --name my-running-app -p 8080:80 my-app

docker build -t my-app . docker run -dit --name my-running-app -p 8080:80 my-app

Visit http://localhost:8080 to view your app.

November 19, 2019

AWS ECR PushPull Policy

Amazon Elastic Container Registry (ECR) is a fully-managed Docker container registry that makes it easy for developers to store, manage, and deploy Docker container images.

Here’s the AWS IAM policy to push and pull images from Docker within ECR.

{
  "Version": "2008-10-17",
  "Statement": [
    {
      "Sid": "AllowPushPull",
      "Effect": "Allow",
      "Resource": [
            "arn:aws:iam::*:role/your-custom-role"
      ],
      "Action": [
        "ecr:GetDownloadUrlForLayer",
        "ecr:BatchGetImage",
        "ecr:BatchCheckLayerAvailability",
        "ecr:PutImage",
        "ecr:InitiateLayerUpload",
        "ecr:UploadLayerPart",
        "ecr:CompleteLayerUpload"
      ]
    }
  ]
}

{ "Version": "2008-10-17", "Statement": [ { "Sid": "AllowPushPull", "Effect": "Allow", "Resource": [ "arn:aws:iam::*:role/your-custom-role" ], "Action": [ "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage", "ecr:BatchCheckLayerAvailability", "ecr:PutImage", "ecr:InitiateLayerUpload", "ecr:UploadLayerPart", "ecr:CompleteLayerUpload" ] } ] }

July 10, 2019

Amazon Linux Docker Install

Here’s the installation of Docker for the original Amazon Linux.

# To install docker
sudo yum install docker
sudo service docker start
# Validate it's working
docker --version
docker run hello-world
docker ps -a
docker image ls

# To install docker sudo yum install docker sudo service docker start # Validate it's working docker --version docker run hello-world docker ps -a docker image ls

July 5, 2019

Icecast on Docker

Run Icecast2 on a Docker container.

docker run -d \
-p 8000:8000 \
-e ICECAST_SOURCE_PASSWORD=aaaa \
-e ICECAST_ADMIN_PASSWORD=bbbb \
-e ICECAST_PASSWORD=cccc \
-e ICECAST_RELAY_PASSWORD=dddd \
moul/icecast

docker run -d \ -p 8000:8000 \ -e ICECAST_SOURCE_PASSWORD=aaaa \ -e ICECAST_ADMIN_PASSWORD=bbbb \ -e ICECAST_PASSWORD=cccc \ -e ICECAST_RELAY_PASSWORD=dddd \ moul/icecast

Access localhost:8000 on browser. Github.

July 4, 2019

Install Docker on Linux

How to install Docker on Linux Mint or Ubuntu.

sudo apt-get install docker-ce docker-ce-cli containerd.io
docker --version

sudo apt-get install docker-ce docker-ce-cli containerd.io docker --version

  • « Previous Page
  • 1
  • 2
  • 3
  • Next Page »
  • Cloud
  • Linux
  • Git

Copyright © 2012–2021