version: "2"

services:
    workshopctl:
        build: .
        image: workshopctl
        working_dir: /root/prepare-vms
        volumes:
            - $HOME/.aws/:/root/.aws/
            - $SSH_AUTH_SOCK:$SSH_AUTH_SOCK
            - $PWD/:/root/prepare-vms/
        environment:
            SSH_AUTH_SOCK: ${SSH_AUTH_SOCK}
            AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
            AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
            AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION}
            AWS_INSTANCE_TYPE: ${AWS_INSTANCE_TYPE}
            USER: ${USER}
        entrypoint: /root/prepare-vms/workshopctl
