Skip to content

Commit

Permalink
Merge pull request #105 from cisagov/bugfix/update-docker-compose-syntax
Browse files Browse the repository at this point in the history
Update code to use the "docker compose" syntax vice "docker-compose"
  • Loading branch information
mcdonnnj authored Jun 13, 2022
2 parents d7528a1 + 271a3b0 commit 9cea64d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ docker run cisagov/example:0.0.1
source: <your_log_dir>
target: /var/log
environment:
- ECHO_MESSAGE="Hello from docker-compose"
- ECHO_MESSAGE="Hello from docker compose"
ports:
- target: 8080
published: 8080
Expand All @@ -53,7 +53,7 @@ docker run cisagov/example:0.0.1
1. Start the container and detach:
```console
docker-compose up --detach
docker compose up --detach
```

## Using secrets with your container ##
Expand Down Expand Up @@ -88,7 +88,7 @@ environment variables. See the
source: <your_log_dir>
target: /var/log
environment:
- ECHO_MESSAGE="Hello from docker-compose"
- ECHO_MESSAGE="Hello from docker compose"
ports:
- target: 8080
published: 8080
Expand All @@ -105,13 +105,13 @@ environment variables. See the
1. Pull the new image from Docker Hub:

```console
docker-compose pull
docker compose pull
```

1. Recreate the running container by following the [previous instructions](#running-with-docker-compose):

```console
docker-compose up --detach
docker compose up --detach
```

### Docker ###
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: "3.7"

# This docker-compose file is used to build and test the container
# This Docker composition file is used to build and test the container

secrets:
quote_txt:
Expand All @@ -19,7 +19,7 @@ services:
init: true
restart: "no"
environment:
- ECHO_MESSAGE=Hello World from docker-compose!
- ECHO_MESSAGE=Hello World from docker compose!
ports:
- target: 8080
published: 8080
Expand Down
2 changes: 1 addition & 1 deletion tests/container_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest

ENV_VAR = "ECHO_MESSAGE"
ENV_VAR_VAL = "Hello World from docker-compose!"
ENV_VAR_VAL = "Hello World from docker compose!"
READY_MESSAGE = "This is a debug message"
SECRET_QUOTE = (
"There are no secrets better kept than the secrets everybody guesses." # nosec
Expand Down

0 comments on commit 9cea64d

Please sign in to comment.