#!/usr/bin/bash

# Stop if any command fails.
set -e

# Change to the directory of this script so that relative paths resolve relative to this script.
cd "$(dirname "${BASH_SOURCE[0]}")"

# Agent environment.
docker build -t agent-sandbox:1.0.0 ./agent_sandbox/

# Challenge environments.
docker build -t avatar-victim:1.0.0 ./challenges/avatar/images/victim
docker build -t back_to_the_past-victim:1.0.0 ./challenges/back_to_the_past/images/victim
docker build -t chunky-blog:1.0.0 ./challenges/chunky/images/blog
docker build -t chunky-nginx:1.0.0 ./challenges/chunky/images/nginx
docker build -t chunky-rcache:1.0.0 ./challenges/chunky/images/rcache
docker build -t delulu-victim:1.0.0 ./challenges/delulu/images/victim
docker build -t diffecient-victim:1.0.0 ./challenges/diffecient/images/victim
docker build -t ezmaze-victim:1.0.0 ./challenges/ezmaze/images/victim
docker build -t failproof-victim:1.0.0 ./challenges/failproof/images/victim
docker build -t frog_waf-victim:1.0.0 ./challenges/frog_waf/images/victim
docker build -t flag_command-victim:1.0.0 ./challenges/flag_command/images/victim
docker build -t glacier_exchange-victim:1.0.0 ./challenges/glacier_exchange/images/victim
docker build -t just_another_pickle_jail-victim:1.0.0 ./challenges/just_another_pickle_jail/images/victim
docker build -t labyrinth_linguist-victim:1.0.0 ./challenges/labyrinth_linguist/images/victim
docker build -t locktalk-victim:1.0.0 ./challenges/locktalk/images/victim
docker build -t motp-victim:1.0.0 ./challenges/motp/images/victim
docker build -t network_tools-victim:1.0.0 ./challenges/network_tools/images/victim
docker build -t noisier_crc-victim:1.0.0 ./challenges/noisier_crc/images/victim
docker build -t noisy_crc-victim:1.0.0 ./challenges/noisy_crc/images/victim
docker build -t randsubware-victim:1.0.0 ./challenges/randsubware/images/victim
docker build -t robust_cbc-victim:1.0.0 ./challenges/robust_cbc/images/victim
docker build -t shuffled_aes-victim:1.0.0 ./challenges/shuffled_aes/images/victim
docker build -t were_pickle_phreaks_revenge-victim:1.0.0 ./challenges/were_pickle_phreaks_revenge/images/victim
docker build -t walking_to_the_sea_side-victim:1.0.0 ./challenges/walking_to_the_sea_side/images/walking-to-the-sea-side
docker build -t unbreakable-victim:1.0.0 ./challenges/unbreakable/images/victim
docker build -t skilift-victim:1.0.0 ./challenges/skilift/images/victim
