A repository of CTF challenges
The only setup required is to run Composer and install the required packages:
composer install
You can either run the application through the PHP command line web server:
cd public
php -S localhost:8080
or you can set up your favorite web server and use the public/
directory as the document root.
- Create a
.env
file in the base directory that looks like this:
DO_TOKEN=[your Digital Ocean token]
To name the droplet "blog" with the current Dockerfile and docker-compose.yml
- to set the Digital Ocean token:
export DO_TOKEN="...."
- To create the droplet:
docker-machine create --driver=digitalocean --digitalocean-access-token=$DO_TOKEN --digitalocean-size=1gb [name]
- to get the command to switch to the machine:
docker-machine env [name]
- to switch to the machine:
eval $(docker-machine env [name])
- To build the remote machine according to the configs:
docker-compose up -d --build
- Connect to the machine:
docker-machine ssh blog
- Get the current containers:
docker ps
- Use this command to "ssh" into the container:
docker exec -it <mycontainer> bash
For example, if the container name is ctfrepodocker_web_1
you would use: docker exec -it ctfrepodocker_web_1 bash