• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Search

images

Stop and remove all Docker containers

December 11, 2021

How to stop and remove all Docker containers.

Stop all containers

$ docker kill $(docker ps -q)

$ docker kill $(docker ps -q)

Remove all containers

$ docker rm $(docker ps -a -q)

$ docker rm $(docker ps -a -q)

Delete all docker images

$ docker rmi $(docker images -q)

$ docker rmi $(docker images -q)

Filed Under: Linux Tagged With: containers, delete, docker, images, remove, stop

AWS ECR PushPull Policy

November 19, 2019

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" ] } ] }

Filed Under: Cloud Tagged With: aws, docker, ecr, iam, images, policy, pull, push

Create Image on GCP

August 8, 2018

Here’s the command to create an image from an existing VM instance. You can create an image from disks, snapshots, images or from a cloud storage file. You can use images you built to launch and restore VM instances, as well as create Instance Templates.

gcloud compute --project=your-project images create your-server --source-disk=your-server --source-disk-zone=us-central1-c

gcloud compute --project=your-project images create your-server --source-disk=your-server --source-disk-zone=us-central1-c

Filed Under: Cloud Tagged With: gcp, images

  • Go to page 1
  • Go to page 2
  • Go to Next Page »
  • Home
  • About
  • Search

Copyright © 2023