Skip to content

Commit

Permalink
tidy up of extra docs (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
msaunby authored Feb 12, 2023
1 parent 49b0c87 commit 9aa7745
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 131 deletions.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions slides/gcloud.md → docs/gcloud.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Docker in Google Cloud Shell

## Web preview

It's very easy to pull and run a container in Cloud Shell. e.g.

```sh
mike_saunby@cloudshell:~ (docker-demo-2023)$ docker pull tiangolo/uwsgi-nginx-flask
mike_saunby@cloudshell:~ (docker-demo-2023)$ docker run -p 8080:80 docker.io/tiangolo/uwsgi-nginx-flask:latest
```


## SSH to Cloud Shell

<https://medium.com/@alex.burdenko/vs-code-happens-to-be-my-favorite-code-editor-and-ive-been-lucky-to-participate-so-many-diverse-952102856a7a>
The web preview feature enables forwarding of port 8080 to you web browser.

## Docker command line

Expand Down
47 changes: 47 additions & 0 deletions docs/ghrc-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Container registries

Building a Docker image in a GitHub action is very simple, however generating an appropriately tagged image and authenticating and pushing to a container registry is more complicated.

## Docker Hub - docker.io

To push to Hocker Hub from an Action secret environment variables are used. e.g.

```sh
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
```

And set a secret in the repository settings.

![](Screenshot-github-secret.png)

## GitHub Container Registry - ghcr.io

The GitHub container registry avoids having to set secret variables as we can get the username and password using the built in GITHUB_TOKEN

```
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
```

To pull an image from any repository other than docker.io requires that the full name is used. e.g.

```msaunby/building-docker-containers-in-github:latest``` and ```docker.io/msaunby/building-docker-containers-in-github:latest``` are equivalent.

GitHub registry

```ghcr.io/msaunby/building-docker-containers-in-github:latest```

Google

```gcr.io```

Azure

```{myregistry}.azurecr.io```

AWS

```public.ecr.aws``` Private registries have more complicated names.


File renamed without changes.
19 changes: 0 additions & 19 deletions slides/actions.md

This file was deleted.

108 changes: 0 additions & 108 deletions slides/guide.md

This file was deleted.

0 comments on commit 9aa7745

Please sign in to comment.