Skip to content

Commit ec36d76

Browse files
author
hunt3ri
committed
first commit
0 parents  commit ec36d76

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Pycharm
2+
.idea

Dockerfile

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Create docker container with Terraform installed, and suite of tools to ease working with AWS
2+
FROM python:3.10-bullseye
3+
4+
ENV TERRAFORM_VERSION 1.0.10
5+
ENV TERRAFORM_URL https://releases.hashicorp.com/terraform/$TERRAFORM_VERSION/terraform_${TERRAFORM_VERSION}_linux_amd64.zip
6+
7+
ENV PACKER_VERSION 1.7.8
8+
ENV PACKER_URL https://releases.hashicorp.com/packer/$PACKER_VERSION/packer_${PACKER_VERSION}_linux_amd64.zip
9+
10+
ENV AWSCLI_URL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip
11+
12+
RUN apt-get update && apt-get install -y \
13+
dos2unix \
14+
figlet \
15+
vim
16+
17+
# Install Python Tools
18+
RUN python -m pip install --upgrade pip
19+
RUN pip install ansible
20+
21+
# Install AWSCLI
22+
RUN curl -o /opt/awscliv2.zip $AWSCLI_URL && \
23+
unzip /opt/awscliv2.zip && \
24+
./aws/install && \
25+
rm /opt/awscliv2.zip && \
26+
rm -Rf /opt/aws
27+
28+
# Install Terraform
29+
RUN curl -o /tmp/terraform.zip $TERRAFORM_URL && \
30+
unzip /tmp/terraform.zip -d /usr/local/bin/
31+
32+
# Install Packer
33+
RUN curl -o /tmp/packer.zip $PACKER_URL && \
34+
unzip /tmp/packer.zip -d /usr/local/bin/

README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# py-ops
2+
A docker container running the latest version of Python and a set of useful DevOps tools, namely:
3+
4+
* Terraform
5+
* Packer
6+
* Ansible
7+
* AWSCLI
8+
9+
## Build
10+
To build
11+
12+
```commandline
13+
docker build -t hunteri/py-ops:latest .
14+
docker tag imageID hunteri/py-ops:0.1
15+
docker push hunteri/py-ops:latest
16+
```
17+
18+
## Running
19+
```commandline
20+
docker run -dit hunteri/py-ops:latest bash
21+
docker attach <CONTAINER_NAME>
22+
```

0 commit comments

Comments
 (0)