github.com/terraform-modules-krish/terratest@v0.29.0/test-docker-images/gruntwork-amazon-linux-test/Dockerfile (about) 1 # TODO: Is it worth referencing a specific tag instead of latest? 2 FROM amazonlinux:2017.12 3 4 # Reduce Docker image size per https://blog.replicated.com/refactoring-a-dockerfile-for-image-size/ 5 # - perl-Digest-SHA: installs shasum 6 RUN yum update -y && \ 7 yum upgrade -y && \ 8 yum install -y \ 9 hostname \ 10 jq \ 11 perl-Digest-SHA \ 12 rsyslog \ 13 sudo \ 14 tar \ 15 vim \ 16 wget && \ 17 yum clean all && rm -rf /var/cache/yum 18 19 # Installing pip with yum doesn't actually put it in the PATH, so we use easy_install instead. Pip will now be placed 20 # in /usr/local/bin, but amazonlinux's sudo uses a sanitzed PATH that does not include /usr/local/bin, so we symlink pip. 21 # The last line upgrades pip to the latest version. 22 RUN curl https://bootstrap.pypa.io/ez_setup.py | sudo /usr/bin/python && \ 23 easy_install pip && \ 24 pip install --upgrade pip 25 26 # Install the AWSCLI (which apparently does not come pre-bundled with Amazon Linux!) 27 RUN pip install awscli --upgrade 28 29 # Ideally, we'd install the latest version of Docker to avoid a conflict between the Docker client in this container 30 # and the Docker API on your local host, but installing the latest version of Docker yields the error "Requires: 31 # container-selinux >= 2.9", whch indicates that a newer Linux kernel version is required than what comes with Amazon Linux. 32 # So we settle for the Amazon Linux supported version for now. 33 RUN yum install -y docker