Skip to content

Commit

Permalink
update docs & ci config for latest docker engine
Browse files Browse the repository at this point in the history
compatible with Compose v2

remove manual docker install steps from ci

add readme callout for docker desktop

remove all explicit install steps for Docker

depend on image for systemctl
  • Loading branch information
codevbus committed Sep 9, 2022
1 parent 71fe3e9 commit d5de1cd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
22 changes: 17 additions & 5 deletions .circleci/config.yml
Expand Up @@ -15,6 +15,12 @@ jobs:
- restore_cache:
keys:
- v1-docker-{{ .Branch }}
- run:
name: Install latest Docker and Docker Compose
command: |
mkdir -p $HOME/.docker/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-linux-x86_64 -o $HOME/.docker/cli-plugins/docker-compose
chmod +x $HOME/.docker/cli-plugins/docker-compose
- run:
name: Load Docker layers cache
command: |
Expand All @@ -25,7 +31,7 @@ jobs:
command: |
python3 rename.py git
cp -R ctfd/data/ tmp-ctfd/
docker-compose -f docker-compose-dev.yaml up -d --build
docker compose -f docker-compose-dev.yaml up -d --build
- run:
name: Save Docker layers cache
command: |
Expand Down Expand Up @@ -71,6 +77,12 @@ jobs:
- restore_cache:
keys:
- v1-docker-{{ .Branch }}
- run:
name: Install latest Docker and Docker Compose
command: |
mkdir -p $HOME/.docker/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.10.2/docker-compose-linux-x86_64 -o $HOME/.docker/cli-plugins/docker-compose
chmod +x $HOME/.docker/cli-plugins/docker-compose
- run:
name: Load Docker layers cache
command: |
Expand All @@ -82,8 +94,8 @@ jobs:
command: |
python3 rename.py git
cp -R ctfd/data/ tmp-ctfd/
docker-compose -f docker-compose-dev.yaml build --build-arg VERSION=$VERSION --build-arg COMMIT_SHA=$CIRCLE_SHA1
docker-compose -f docker-compose-dev.yaml up -d
docker compose -f docker-compose-dev.yaml build --build-arg VERSION=$VERSION --build-arg COMMIT_SHA=$CIRCLE_SHA1
docker compose -f docker-compose-dev.yaml up -d
- run:
name: Install testing dependencies
command: |
Expand All @@ -107,12 +119,12 @@ jobs:
name: Pytest
command: |
pipenv run python -m pytest tests/
docker-compose -f docker-compose-dev.yaml down
docker compose -f docker-compose-dev.yaml down
- run:
name: Push latest
command: |
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
docker-compose -f docker-compose-dev.yaml push
docker compose -f docker-compose-dev.yaml push
- run:
name: Push version
command: |
Expand Down
15 changes: 13 additions & 2 deletions README.md
Expand Up @@ -48,10 +48,21 @@ The images are configured to interconnect in a way that creates fully functional

## Download & Run
**There's no need to clone the repository.**

### Prerequisites

Users of Docker Desktop already have the Docker Engine and Docker Compose installed, and can move on to installing cicd-goat.

- [Docker Engine](https://docs.docker.com/engine/install/) `19.03.0+`
- [Docker Compose](https://docs.docker.com/compose/install/)

Newer versions of Docker require users to install Docker Compose as a separate plugin: https://docs.docker.com/compose/cli-command-compatibility/

### Linux & Mac
```sh
curl -o cicd-goat/docker-compose.yaml --create-dirs https://raw.githubusercontent.com/cider-security-research/cicd-goat/main/docker-compose.yaml
cd cicd-goat && docker-compose up -d
mkdir -p $HOME/cicd-goat
curl -o /home/ubuntu/cicd-goat/docker-compose.yaml https://raw.githubusercontent.com/cider-security-research/cicd-goat/main/docker-compose.yaml
cd cicd-goat && docker compose up -d
```

### Windows (Powershell)
Expand Down

0 comments on commit d5de1cd

Please sign in to comment.