• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

push

Git Remove Files From Repo After Commit

October 4, 2022

If you need to remove files from a repo after committing, use …

Remove file

git rm --cached file.ext

git rm --cached file.ext

Push to repo

git push

git push

Filed Under: Linux Tagged With: cache, commit, git, push, rm

Docker to GCR

January 12, 2020

Here’s a couple of steps to move a Docker image to the Google Container Registry.

Create a container image.

docker build -t gcr.io/${PROJECT_ID}/my-app:v1 .

docker build -t gcr.io/${PROJECT_ID}/my-app:v1 .

Push image to GCR.

docker push gcr.io/[PROJECT-ID]/[IMAGE]

docker push gcr.io/[PROJECT-ID]/[IMAGE]

Filed Under: Cloud Tagged With: build, docker, gcp, push

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

Git Push

November 4, 2012

The Git Push command sends all commits found in the local repository to the remote or master repository on the web such as Github or Unfuddle, as an example. You can invoke the Git Push command from the Terminal by typing the following:

git push

git push

In addition, you can be more specific by typing the following:

git push origin master

git push origin master

Filed Under: Git Tagged With: push

  • Home
  • About
  • Archives

Copyright © 2023