https://github.com/twogg-git/docker-registry-workshop
A quick workshop for Docker Registry
https://github.com/twogg-git/docker-registry-workshop
Last synced: 10 months ago
JSON representation
A quick workshop for Docker Registry
- Host: GitHub
- URL: https://github.com/twogg-git/docker-registry-workshop
- Owner: twogg-git
- Created: 2019-06-11T00:26:30.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-11T14:05:56.000Z (about 7 years ago)
- Last Synced: 2025-03-23T02:01:52.846Z (about 1 year ago)
- Language: Go
- Size: 996 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Docker Registry Workshop
A quick workshop for Docker Registry.
Tools to use:
- https://docs.docker.com/
- https://hub.docker.com/
## Working locally
We are going to start with an Apache httpd deploy. Here is our Dockerfile and a simple index.html file.
```sh
FROM httpd:2.4.39-alpine
ADD index.html /usr/local/apache2/htdocs/
EXPOSE 80
```
```sh
Docker
Baby steps with Docker Registry + HTTPD!
```
### Then build, test and commit locally
```sh
docker build -t httpd-test .
```
```sh
docker images
```
```sh
docker run --name httpd-test --rm -p 81:80 httpd-test
```
```sh
http://localhost:81/
```
```sh
docker container ls
```
```sh
docker commit httpd-test twogghub/httpd-test:version1
```
## DockerHub Registry
We are going to use DockerHUb free registry, so you need to create an account here https://hub.docker.com/

## Push a image into DockerHub
Now, push the images from our terminal following the dockerhub instructions.

```sh
docker login --username=twoggtest
```
```sh
docker tag httpd-test twoggtest/httpd:1.0
```
```sh
docker push twoggtest/httpd:1.0
```

## DockerHub Automated Builds
If you want a personalized repo, go to Create Repository and select a connected git account.

Then setup your branch or tag tag and the autobild triggers.

```sh
docker build -t twoggtest/golang:1.0 .
```
```sh
docker run --name twoggtest-golang --rm -p 8081:8080 twoggtest/golang:1.0
```
```sh
docker push twoggtest/golang:1.0
```