#!/usr/bin/python3
import argparse
import os
from os import environ
from subprocess import check_call

# Store the current directory
owd = os.getcwd()

# Setup the supported command-line arguments
parser = argparse.ArgumentParser(description='Build project Docker images')

# Parse the command-line arguments
args = parser.parse_args()

# Change working directory
os.chdir(os.path.join(os.path.dirname( __file__ ), '..' ))

print('Building rustyhorde twists image')
check_call(["docker", "build", "-t", "rustyhorde/twists:dev", "-f", "Dockerfile", "."])

# Change back to the original directory
os.chdir(owd)
