An open API service indexing awesome lists of open source software.

https://github.com/twogg-git/docker-registry-workshop

A quick workshop for Docker Registry
https://github.com/twogg-git/docker-registry-workshop

Last synced: 2 months ago
JSON representation

A quick workshop for Docker Registry

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
```