2020-01-07 09:32:27 +00:00
|
|
|
# Docker
|
2020-01-07 09:22:41 +00:00
|
|
|
|
2020-01-07 11:14:08 +00:00
|
|
|
Dockerfile and compose files used as basis for service deployment.
|
2020-01-16 14:09:47 +00:00
|
|
|
|
|
|
|
## Build and push an image
|
|
|
|
|
|
|
|
Build the image.
|
|
|
|
```
|
2020-01-24 10:34:16 +00:00
|
|
|
$ docker build -t [registryUrl]/[imageName]:[tag] [folder]
|
2020-01-16 14:09:47 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Login into docker registry.
|
|
|
|
```
|
|
|
|
$ docker login [registryUrl]
|
|
|
|
```
|
|
|
|
|
|
|
|
Push the image.
|
|
|
|
```
|
|
|
|
$ docker push [registryUrl]/[imageName]:[tag]
|
|
|
|
```
|
|
|
|
|
2020-01-24 10:36:16 +00:00
|
|
|
Logout from docker registry (Optional, if you don't logout credentials with be
|
|
|
|
saved at your home directory).
|
2020-01-16 14:09:47 +00:00
|
|
|
```
|
|
|
|
$ docker logout [registryUrl]
|
|
|
|
```
|