-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from gruntwork-io/more-docker
Add baseline Docker images for Amazon Linux and CentOS 7
- Loading branch information
Showing
5 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# TODO: Is it worth referencing a specific tag instead of latest? | ||
FROM amazonlinux:latest | ||
|
||
# Reduce Docker image size per https://blog.replicated.com/refactoring-a-dockerfile-for-image-size/ | ||
# - The last line upgrades pip to the latest version. | ||
RUN yum update -y && \ | ||
yum upgrade -y && \ | ||
yum install -y \ | ||
jq \ | ||
rsyslog \ | ||
sudo \ | ||
vim \ | ||
wget && \ | ||
yum clean all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Gruntwork Amazon-Linux-Test Docker Image | ||
|
||
The purpose of this Docker image is to provide a pre-built Amazon Linux Docker image that has most of the libraries | ||
we would expect to be installed on the Amazon Linux AMI that would run in AWS. For example, we'd expect `sudo` in AWS, | ||
but it doesn't exist by default in Docker `amazonlinux:latest`. | ||
|
||
### Building and Pushing a New Docker Image to Docker Hub | ||
|
||
This Docker image should publicly accessible via Docker Hub at https://hub.docker.com/r/gruntwork/amazonlinux-test/. To build and | ||
upload it: | ||
|
||
1. `docker build -t gruntwork/amazonlinux-test:latest .` | ||
1. `docker push gruntwork/amazonlinux-test:latest` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM centos:7 | ||
|
||
# Reduce Docker image size per https://blog.replicated.com/refactoring-a-dockerfile-for-image-size/ | ||
# - The last line upgrades pip to the latest version. | ||
RUN yum update -y && \ | ||
yum upgrade -y && \ | ||
yum install -y epel-release && \ | ||
yum install -y \ | ||
bind-utils \ | ||
python-pip \ | ||
rsyslog \ | ||
sudo \ | ||
vim \ | ||
wget && \ | ||
yum clean all | ||
|
||
# Install jq. Oddly, there's no RPM for jq, so we install the binary directly. https://serverfault.com/a/768061/199943 | ||
RUN wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 && \ | ||
chmod +x ./jq && \ | ||
cp jq /usr/bin | ||
|
||
# Install the AWS CLI per https://docs.aws.amazon.com/cli/latest/userguide/installing.html | ||
RUN pip install --upgrade pip && \ | ||
pip install --upgrade setuptools && \ | ||
pip install awscli --upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Gruntwork CentOS-Test Docker Image | ||
|
||
The purpose of this Docker image is to provide a pre-built CentOS 7 Docker image that has most of the libraries | ||
we would expect to be installed on the CentOS 7 AMI that would run in AWS. For example, we'd expect `sudo` in AWS, | ||
but it doesn't exist by default in Docker `centos:7`. | ||
|
||
### Building and Pushing a New Docker Image to Docker Hub | ||
|
||
This Docker image should publicly accessible via Docker Hub at https://hub.docker.com/r/gruntwork/centos-test/. To build and | ||
upload it: | ||
|
||
1. `docker build -t gruntwork/centos-test:7 .` | ||
1. `docker push gruntwork/centos-test:7` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters