Skip to content

Instantly share code, notes, and snippets.

@stknohg
Last active September 13, 2021 10:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stknohg/07be3062cb712857cbf56b7bcdb328ba to your computer and use it in GitHub Desktop.
Save stknohg/07be3062cb712857cbf56b7bcdb328ba to your computer and use it in GitHub Desktop.
CloudFormation Rainをお手軽に実行するDockerコンテナイメージ
#
# CloudFormation Rain Docker image
#
# How to build:
# docker build -t aws-cfn-rain .
# How to use (e.g. docker run from PowerShell host):
# docker run --rm -it -v "$HOME/.aws/:/root/.aws" -v "$($pwd.Path):/aws" -e AWS_PROFILE aws-cfn-rain --version
# docker run --rm -it -v "$HOME/.aws/:/root/.aws" -v "$($pwd.Path):/aws" -e AWS_PROFILE aws-cfn-rain deploy ./sample.yaml
#
FROM amazon/aws-cli:latest
ARG RAIN_VER=1.2.0
ADD https://github.com/aws-cloudformation/rain/releases/download/v${RAIN_VER}/rain-v${RAIN_VER}_linux-amd64.zip /tmp/rain.zip
# Install Rain
RUN yum install unzip -y \
&& unzip -j /tmp/rain.zip */rain -d /usr/local/bin/ \
&& chmod 755 /usr/local/bin/rain \
&& rm /tmp/rain.zip
ENTRYPOINT ["/usr/local/bin/rain"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment