# Docker Commands

## General CMD

---

### Show list of dockers:

```bash
docker ps
```

---

### copy CMD

```bash
cp <source file.ext> <new file.ext>
```

---

### Host Web Server

```bash
python3 -m http.server 1337
```

---

### Bash into Docker container

```bash
docker exec -it <container name/id> bash
```

#### accesed via SSH allows to run cmds as the container

---

### Make Dockerfile

[https://stackoverflow.com/questions/45152426/create-docker-compose-file-from-dockerfile](https://stackoverflow.com/questions/45152426/create-docker-compose-file-from-dockerfile)

---

Enable SSH and Root

cd sr