Closed amanbabbar-kipl closed 5 years ago
@kiplphp38 are you trying to build the docker image, or run it? I would not place terraform files in the blast-radius source directory, as it doesn't look for them at build time.
To build the image:
docker build -t blast-radius .
To run it, change to the project directory, and run:
docker run --cap-add=SYS_ADMIN -it --rm -p 5000:5000 -v $(pwd):/workdir:ro 28mm/blast-radius
Hope that helps!
@28mm I successfully build the image but got another error To build the image:
docker build -t blast-radius .
To run it in the same directory having *.tf files with modules. i got error
/src/docker-entrypoint.sh: line 14: cd: /workdir-rw: No such file or directory
then i update /workdir to /workdir-rw in the below command
docker run --cap-add=SYS_ADMIN -it --rm -p 5000:5000 -v $(pwd):/workdir-rw:ro 28mm/blast-radius
after that i got error:
Error loading modules: error downloading 'file:///workdir-rw/modules/vpc': remove .terraform/modules/9bf8ac2d543bbd59da3f80f814aabc34: read-only file system
@kiplphp38
It's not obvious to me why docker-entrypoint.sh
would fail to cd
to /workdir-rw
, since it creates it several earlier, and is running with set -e
It might be worth starting from scratch, here, beginning with deleting any existing images.
docker rmi blast-radius
docker rmi 28mm/blast-radius
Now clone the repo and rebuild the image
git clone https://github.com/28mm/blast-radius.git \
&& cd blast-radius \
&& docker build -t blast-radius .
And finally execute
docker run --cap-add=SYS_ADMIN -it --rm -p 5000:5000 -v $(pwd):/workdir:ro blast-radius
i download the zip code and extract. put one *.tf file in same directory. after running the below command, i got error mentioned below: command:
error: