Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions docker_instructions.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
# To build the docker container
Run all the following commands from the root directory
### Build and Run your service:
`docker compose up --build -d`
```sh
docker compose up --build -d
```

### Find the container name:
`docker ps`
```sh
docker ps
```

Should look something like:
```
```txt
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7b2de3be0087 participation-project-napolitan "tail -f /dev/null" 5 seconds ago Up 4 seconds participation-project-napolitan-1
```

### Execute a bash shell inside the container:
Use the name from above.\
`docker exec -it participation-project-napolitan-1 bash`
Use the name from above.
```sh
docker exec -it participation-project-napolitan-1 bash
```

### Setup gcloud cli project and authenticate:
`gcloud auth application-default login && \`\
`gcloud config set project <project_name>`
```sh
gcloud auth application-default login && \
gcloud config set project <project_name>
```

# To delete docker container
`docker compose down --rmi all --volumes`
```sh
docker compose down --rmi all --volumes
```