├── .dockerignore ├── .gitignore ├── .ruby-version ├── .travis.yml ├── Dockerfile ├── Gemfile ├── Gemfile.lock ├── LICENSE ├── README.md └── script └── test /.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !Dockerfile 3 | !Gemfile 4 | !Gemfile.lock 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by https://www.gitignore.io 2 | 3 | ### Ruby ### 4 | *.gem 5 | *.rbc 6 | /.config 7 | /coverage/ 8 | /InstalledFiles 9 | /pkg/ 10 | /spec/reports/ 11 | /test/tmp/ 12 | /test/version_tmp/ 13 | /tmp/ 14 | 15 | ## Specific to RubyMotion: 16 | .dat* 17 | .repl_history 18 | build/ 19 | 20 | ## Documentation cache and generated files: 21 | /.yardoc/ 22 | /_yardoc/ 23 | /doc/ 24 | /rdoc/ 25 | 26 | ## Environment normalisation: 27 | /.bundle/ 28 | /vendor/bundle 29 | /lib/bundler/man/ 30 | 31 | # for a library or gem, you might want to ignore these files since the code is 32 | # intended to run in multiple environments; otherwise, check them in: 33 | # Gemfile.lock 34 | # .ruby-version 35 | # .ruby-gemset 36 | 37 | # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: 38 | .rvmrc 39 | 40 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.4.2 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | services: 3 | - docker 4 | language: bash 5 | before_install: 6 | - docker -v 7 | script: 8 | - script/test 9 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ruby:2.4.2-alpine3.6 2 | 3 | RUN bundle config --global frozen 1 4 | 5 | WORKDIR /app 6 | COPY Gemfile /app/ 7 | COPY Gemfile.lock /app/ 8 | 9 | RUN apk add --no-cache --update --virtual .build-deps \ 10 | g++ make \ 11 | && bundle install -j4 --without test development --system \ 12 | && apk del .build-deps 13 | 14 | CMD ["terraforming", "help"] 15 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "terraforming", "0.16.0" 4 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | aws-sdk-autoscaling (1.3.0) 5 | aws-sdk-core (~> 3) 6 | aws-sigv4 (~> 1.0) 7 | aws-sdk-cloudwatch (1.2.0) 8 | aws-sdk-core (~> 3) 9 | aws-sigv4 (~> 1.0) 10 | aws-sdk-core (3.6.0) 11 | aws-partitions (~> 1.0) 12 | aws-sigv4 (~> 1.0) 13 | jmespath (~> 1.0) 14 | aws-sdk-ec2 (1.14.0) 15 | aws-sdk-core (~> 3) 16 | aws-sigv4 (~> 1.0) 17 | aws-sdk-efs (1.0.0) 18 | aws-sdk-core (~> 3) 19 | aws-sigv4 (~> 1.0) 20 | aws-sdk-elasticache (1.2.0) 21 | aws-sdk-core (~> 3) 22 | aws-sigv4 (~> 1.0) 23 | aws-sdk-elasticloadbalancing (1.1.0) 24 | aws-sdk-core (~> 3) 25 | aws-sigv4 (~> 1.0) 26 | aws-sdk-elasticloadbalancingv2 (1.4.0) 27 | aws-sdk-core (~> 3) 28 | aws-sigv4 (~> 1.0) 29 | aws-sdk-iam (1.3.0) 30 | aws-sdk-core (~> 3) 31 | aws-sigv4 (~> 1.0) 32 | aws-sdk-kms (1.2.0) 33 | aws-sdk-core (~> 3) 34 | aws-sigv4 (~> 1.0) 35 | aws-sdk-rds (1.6.0) 36 | aws-sdk-core (~> 3) 37 | aws-sigv4 (~> 1.0) 38 | aws-sdk-redshift (1.1.0) 39 | aws-sdk-core (~> 3) 40 | aws-sigv4 (~> 1.0) 41 | aws-sdk-route53 (1.3.0) 42 | aws-sdk-core (~> 3) 43 | aws-sigv4 (~> 1.0) 44 | aws-sdk-s3 (1.5.0) 45 | aws-sdk-core (~> 3) 46 | aws-sdk-kms (~> 1) 47 | aws-sigv4 (~> 1.0) 48 | aws-sdk-sns (1.1.0) 49 | aws-sdk-core (~> 3) 50 | aws-sigv4 (~> 1.0) 51 | aws-sdk-sqs (1.3.0) 52 | aws-sdk-core (~> 3) 53 | aws-sigv4 (~> 1.0) 54 | aws-sigv4 (1.0.2) 55 | aws-partitions (1.27.0) 56 | jmespath (1.3.1) 57 | multi_json (1.12.1) 58 | terraforming (0.16.0) 59 | aws-sdk-autoscaling (~> 1) 60 | aws-sdk-cloudwatch (~> 1) 61 | aws-sdk-ec2 (~> 1) 62 | aws-sdk-efs (~> 1) 63 | aws-sdk-elasticache (~> 1) 64 | aws-sdk-elasticloadbalancing (~> 1) 65 | aws-sdk-elasticloadbalancingv2 (~> 1) 66 | aws-sdk-iam (~> 1) 67 | aws-sdk-kms (~> 1) 68 | aws-sdk-rds (~> 1) 69 | aws-sdk-redshift (~> 1) 70 | aws-sdk-route53 (~> 1) 71 | aws-sdk-s3 (~> 1) 72 | aws-sdk-sns (~> 1) 73 | aws-sdk-sqs (~> 1) 74 | multi_json (~> 1.12.1) 75 | thor 76 | thor (0.20.0) 77 | 78 | PLATFORMS 79 | ruby 80 | 81 | DEPENDENCIES 82 | terraforming (= 0.16.0) 83 | 84 | BUNDLED WITH 85 | 1.15.4 86 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Daisuke Fujita 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Terraforming Docker Image 2 | 3 | [![Build Status](https://travis-ci.org/dtan4/dockerfile-terraforming.svg?branch=master)](https://travis-ci.org/dtan4/dockerfile-terraforming) 4 | [![Dependency Status](https://gemnasium.com/dtan4/terraforming.svg)](https://gemnasium.com/dtan4/terraforming) 5 | [![Docker Repository on Quay.io](https://quay.io/repository/dtan4/terraforming/status "Docker Repository on Quay.io")](https://quay.io/repository/dtan4/terraforming) 6 | [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE) 7 | 8 | Docker Image for [Terraforming](https://github.com/dtan4/terraforming). 9 | Please see [Terraforming Github repository](https://github.com/dtan4/terraforming) for more information about Terraforming. 10 | 11 | ## Image Repository 12 | 13 | [__quay.io/dtan4/terraforming__](https://quay.io/repository/dtan4/terraforming) 14 | 15 | ## Supported Tags 16 | 17 | - `latest` 18 | - Ruby 2.4.2 19 | - Terraforming 0.16.0 20 | 21 | ## Usage 22 | 23 | ```bash 24 | $ docker run \ 25 | --rm \ 26 | -e AWS_ACCESS_KEY_ID=XXXXXXXXXXXXXXXXXXXX \ 27 | -e AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \ 28 | -e AWS_DEFAULT_REGION=xx-yyyy-0 \ 29 | quay.io/dtan4/terraforming:latest \ 30 | terraforming help 31 | ``` 32 | 33 | ## License 34 | 35 | [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE) 36 | -------------------------------------------------------------------------------- /script/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Usage: script/test 4 | # Description: script to run test 5 | # 6 | 7 | # this script should be run in project root 8 | BASE_DIRECTORY=`pwd` 9 | TERRAFORMING_VERSION="0.16.0" 10 | 11 | echo "==> Building target..." 12 | cd ${BASE_DIRECTORY} 13 | docker build -t quay.io/dtan4/terraforming:latest . 14 | 15 | echo "==> Check Terraforming version..." 16 | docker run \ 17 | --rm \ 18 | --name terraforming \ 19 | quay.io/dtan4/terraforming:latest \ 20 | gem list terraforming | \ 21 | grep -e $TERRAFORMING_VERSION 22 | 23 | if [ $? -eq 0 ] 24 | then 25 | echo " Test passed" 26 | else 27 | echo " Test failed" 28 | exit 1 29 | fi 30 | 31 | echo "==> Check Terraforming is available..." 32 | docker run \ 33 | --rm \ 34 | --name terraforming \ 35 | quay.io/dtan4/terraforming:latest \ 36 | terraforming | \ 37 | grep -e "Commands:" 38 | 39 | if [ $? -eq 0 ] 40 | then 41 | echo " Test passed" 42 | else 43 | echo " Test failed" 44 | exit 1 45 | fi 46 | 47 | echo "==> Cleaning up..." 48 | docker kill terraforming > /dev/null 2>&1 || true 49 | docker rm terraforming > /dev/null 2>&1 || true 50 | --------------------------------------------------------------------------------