Skip to content

Commit

Permalink
updates (#18)
Browse files Browse the repository at this point in the history
* updates

* extras
  • Loading branch information
msaunby authored Feb 16, 2023
1 parent 8eadf9e commit 20ab795
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# building-docker-containers-in-github
Demonstration of how, and why, to build containers with GitHub Actions
Demonstration of how to build containers with GitHub Actions.

The Flask webserver project in this repository is built and pushed to Docker Hub using GitHub Actions.

See [the slides](flaskserver/static/slides.md).
53 changes: 53 additions & 0 deletions docs/deployment2.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@startuml
!pragma layout smetana

cloud "GitHub\n" {
card project [
Project
----
Python app
....
Dockerfile
]

}


' thing
together {
cloud "Hosting service\n" {

card image [
Docker image
----
Base image
....
Project
....
Dependencies
]

card registry [
Container registry
----
tag:latest
....
tag:v1.1.0
....
tag v1.0.0
....
]

card container[
application
container
]
}
actor "http://myproject.app" as a
}

project --> image : " clone "
image -r-> registry : push
registry -> container : " pull "
container --> a
@enduml
19 changes: 19 additions & 0 deletions flaskserver/00README/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (C) 2011-2023 Hakim El Hattab, http://hakim.se, and reveal.js contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
3 changes: 3 additions & 0 deletions flaskserver/00README/revealjs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The slideshow part of the project uses Reveal.js. See https://github.com/hakimel/reveal.js/ and please note the licence conditions, which are copied here.

Michael Saunby. February. 2023
123 changes: 123 additions & 0 deletions flaskserver/static/deployment2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions flaskserver/static/slides.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ Deploying a container is very simple, we just tell the hosting service the URL o
* Approve the pull-request
* Create a new release
* GitHub action builds and pushes the new image
* Manually update the deployed version in Google Cloud
Expand All @@ -189,14 +191,45 @@ Typically the last step is also automated, and there would be automated tests of
## Deployment
### Build on GitHub
![](deployment.svg)
### Build on Google, AWS, Docker, etc.
![](deployment2.svg)
## What next?
### Google Cloud Shell
Click on ```[>_]``` for command line tools including git and docker.

```sh
$ git clone <your repo>
$ cd <repo dir>
$ docker build -t testimg .
....
$ docker run -p 8080:5000 testimg
```

### Containers as development environments

"The Visual Studio Code Dev Containers extension lets you use a container as a full-featured development environment."

<https://code.visualstudio.com/docs/devcontainers/containers>

### Docker Compose and Kubernetes

<https://docs.docker.com/compose/>

<https://microk8s.io/>


## [The End](/)

0 comments on commit 20ab795

Please sign in to comment.