Autosave: 2024-03-30 16:10:03
This commit is contained in:
parent
caf07a4dd3
commit
2c873c6db1
2 changed files with 28 additions and 0 deletions
BIN
.zk/notebook.db
BIN
.zk/notebook.db
Binary file not shown.
28
zk/Docker_rough_notes.md
Normal file
28
zk/Docker_rough_notes.md
Normal file
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
id: dmuz
|
||||
title: Docker_rough_notes
|
||||
tags: []
|
||||
created: Saturday, March 30, 2024
|
||||
---
|
||||
|
||||
# Docker_rough_notes
|
||||
|
||||
## Creating and running a simple image (without Docker compose)
|
||||
|
||||
Create the Dockerfile in the root of the project.
|
||||
|
||||
Then build the image from root.
|
||||
|
||||
```
|
||||
docker build -t image-name .
|
||||
```
|
||||
|
||||
The image name is defined at this point, not pre-defined.
|
||||
|
||||
If successful, run the image:
|
||||
|
||||
```
|
||||
docker run --name your-container-name image-name
|
||||
```
|
||||
|
||||
Again, the container-name is defined at the point of the `run` declaration.
|
Loading…
Add table
Reference in a new issue