-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
543257d
commit b30caf1
Showing
5 changed files
with
493 additions
and
167 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 |
---|---|---|
@@ -1,53 +1,18 @@ | ||
FROM python:slim-bookworm | ||
|
||
# Set Variables | ||
ARG LINUX_USER=vscode | ||
ARG TF_VERSION=1.6.6 | ||
ARG TFDOCS_VERSION=latest | ||
ARG TFLINT_VERSION=latest | ||
ARG TFTRIVY_VERSION=latest | ||
ARG TERRAGRUNT_VERSION=latest | ||
ARG LINUX_USER | ||
ARG TERRAFORM_VERSION | ||
ARG TERRAFORMER_VERSION | ||
ARG TFDOCS_VERSION | ||
ARG TFLINT_VERSION | ||
ARG TFTRIVY_VERSION | ||
ARG TERRAGRUNT_VERSION | ||
|
||
# Copy setup script | ||
COPY ./scripts/setup-docker-container.sh /tmp | ||
COPY requirements.txt /tmp | ||
|
||
# Install all applications | ||
RUN /tmp/setup-docker-container.sh install all ${TF_VERSION} ${TFDOCS_VERSION} ${TFLINT_VERSION} ${TFTRIVY_VERSION} ${TERRAGRUNT_VERSION} | ||
|
||
# # Install OS requirements | ||
# RUN /tmp/setup-docker-container.sh install os-requirements | ||
|
||
# # Install pip | ||
# RUN /tmp/setup-docker-container.sh install pip | ||
|
||
# # Install pip requirements | ||
# RUN /tmp/setup-docker-container.sh install pip-requirements | ||
|
||
# # Install Terraform and Terraform tools | ||
# RUN /tmp/setup-docker-container.sh install terraform ${TF_VERSION} \ | ||
# && /tmp/setup-docker-container.sh install terraform-docs ${TFDOCS_VERSION} \ | ||
# && /tmp/setup-docker-container.sh install terragrunt ${TERRAGRUNT_VERSION} \ | ||
# && /tmp/setup-docker-container.sh install tflint ${TFLINT_VERSION} \ | ||
# && /tmp/setup-docker-container.sh install trivy ${TFTRIVY_VERSION} | ||
|
||
|
||
# # Install Pre-Commit | ||
# RUN /tmp/setup-docker-container.sh install pre-commit | ||
|
||
# # Setup python-argcomplete | ||
# RUN /tmp/setup-docker-container.sh setup python-argcomplete | ||
|
||
# # Setup default user | ||
# RUN /tmp/setup-docker-container.sh setup user ${LINUX_USER} | ||
|
||
# # Setup default user id_rsa ssh keypair | ||
# RUN /tmp/setup-docker-container.sh setup ssh-key ${LINUX_USER} | ||
|
||
# # Set default user | ||
# USER ${LINUX_USER} | ||
# WORKDIR /home/${LINUX_USER} | ||
|
||
# # Setup oh-my-bash | ||
# RUN /tmp/setup-docker-container.sh setup oh-my-bash | ||
|
||
# HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "pgrep bash" ] | ||
RUN chmod +x /tmp/setup-docker-container.sh && \ | ||
/tmp/setup-docker-container.sh install all terraform ${TERRAFORM_VERSION} ${TERRAFORMER_VERSION} ${TFDOCS_VERSION} ${TFLINT_VERSION} ${TFTRIVY_VERSION} ${TERRAGRUNT_VERSION} |
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 |
---|---|---|
@@ -1,78 +1,98 @@ | ||
{ | ||
"name": "terraform-playground", | ||
"build": { | ||
"dockerfile": "./Dockerfile", | ||
"args": { | ||
"-t": "local/terraform-playground" | ||
}, | ||
"context": "." | ||
}, | ||
"runArgs": [ | ||
"--name=terraform-playground", | ||
"--hostname=terraform" | ||
], | ||
"initializeCommand": "bash ./.devcontainer/scripts/initialize-command.sh", | ||
"onCreateCommand": "bash ./.devcontainer/scripts/on-create-command.sh", | ||
"postCreateCommand": "bash ./.devcontainer/scripts/post-create-command.sh", | ||
"remoteUser": "vscode", | ||
// "remoteEnv": { | ||
// "PATH": "${containerEnv:PATH}:/home/vscode/.local/bin" | ||
"name": "terraform", | ||
// "image": "git.dogado.net:5000/mcs/eaa/docker-image-terraform:latest", | ||
"build": { | ||
// "args": { | ||
// "LINUX_USER": "", | ||
// "TERRAFORM_VERSION": "", | ||
// "TERRAFORMER_VERSION": "", | ||
// "TFDOCS_VERSION": "", | ||
// "TFLINT_VERSION": "", | ||
// "TFTRIVY_VERSION": "", | ||
// "TERRAGRUNT_VERSION": "" | ||
// }, | ||
"features": { | ||
// https://github.com/devcontainers/features/tree/main/src/common-utils | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
// "upgradePackages": "true", | ||
"installZsh": "false", | ||
"configureZshAsDefaultShell": "false", | ||
// "userUid": "1000", | ||
// "userGid": "1000", | ||
"username": "vscode" | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"runArgs": [ | ||
"--hostname=terraform" | ||
], | ||
"initializeCommand": "bash ./.devcontainer/scripts/initialize-command.sh", | ||
"onCreateCommand": "bash ./.devcontainer/scripts/on-create-command.sh", | ||
"postCreateCommand": "bash ./.devcontainer/scripts/post-create-command.sh", | ||
"containerEnv": { | ||
"TZ": "Europe/Berlin" | ||
}, | ||
"remoteUser": "vscode", | ||
"remoteEnv": { | ||
"PATH": "${containerEnv:PATH}:/home/vscode/.local/bin:/workspaces/terraform-playground/.devcontainer/scripts" | ||
}, | ||
"features": { | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"installZsh": "false", | ||
"configureZshAsDefaultShell": "false", | ||
"username": "vscode", | ||
// "userUid": "1000", | ||
// "userGid": "1000", | ||
"upgradePackages": "false" | ||
} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"telemetry.telemetryLevel": "off", | ||
"files.eol": "\n", | ||
"files.insertFinalNewline": true, | ||
"files.autoSave": "off", | ||
"editor.formatOnSave": true, | ||
"editor.tabSize": 2, | ||
"git.autorefresh": true, | ||
"git.autofetch": true, | ||
"git.autofetchPeriod": 90, | ||
"git.pullTags": false, | ||
"git.confirmSync": false, | ||
"terminal.integrated.scrollback": 10000, | ||
"[markdown]": { | ||
"editor.defaultFormatter": "yzhang.markdown-all-in-one", | ||
"editor.tabSize": 3 | ||
}, | ||
"[terraform]": { | ||
"editor.defaultFormatter": "hashicorp.terraform" | ||
}, | ||
// https://github.com/devcontainers/features/tree/main/src/docker-outside-of-docker | ||
"ghcr.io/devcontainers/features/docker-outside-of-docker": { | ||
// "dockerDashComposeVersion": "v2", | ||
"installDockerBuildx": false | ||
"[terraform-vars]": { | ||
"editor.defaultFormatter": "hashicorp.terraform" | ||
} | ||
}, | ||
"extensions": [ | ||
"sleistner.vscode-fileutils", | ||
"yzhang.markdown-all-in-one", | ||
"HashiCorp.terraform", | ||
"hashicorp.hcl", | ||
"mhutchie.git-graph" | ||
] | ||
} | ||
}, | ||
"mounts": [ | ||
// OPTIONAL: Mount your local docker socket into the devcontainer for using proivider 'docker' | ||
// { | ||
// "source": "/var/run/docker.sock", | ||
// "target": "/var/run/docker.sock", | ||
// "type": "bind" | ||
// }, | ||
// OPTIONAL: Mount your local workspace directory into the devcontainer | ||
{ | ||
"source": "${localEnv:HOME}${localEnv:USERPROFILE}/.aws", | ||
"target": "/home/vscode/.aws", | ||
"type": "bind" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"telemetry.telemetryLevel": "off", | ||
"files.eol": "\n", | ||
"files.insertFinalNewline": true, | ||
"files.autoSave": "off", | ||
"editor.formatOnSave": true, | ||
"git.autorefresh": true, | ||
"git.autofetch": true, | ||
"git.autofetchPeriod": 90, | ||
"git.pullTags": false, | ||
"git.confirmSync": false | ||
}, | ||
"extensions": [ | ||
"sleistner.vscode-fileutils", | ||
"esbenp.prettier-vscode", | ||
"yzhang.markdown-all-in-one", | ||
"HashiCorp.terraform" | ||
] | ||
} | ||
{ | ||
"source": "${localEnv:HOME}${localEnv:USERPROFILE}/.config/openstack", | ||
"target": "/home/vscode/.config/openstack", | ||
"type": "bind" | ||
}, | ||
"mounts": [ | ||
// OPTIONAL: Mount your local docker socket into the devcontainer for using proivider 'docker' | ||
// { | ||
// "source": "/var/run/docker.sock", | ||
// "target": "/var/run/docker.sock", | ||
// "type": "bind" | ||
// }, | ||
// OPTIONAL: Mount your local workspace directory into the devcontainer | ||
// { | ||
// "source": "${localEnv:HOME}${localEnv:USERPROFILE}/workspace", | ||
// "target": "/home/vscode/workspace", | ||
// "type": "bind" | ||
// }, | ||
{ | ||
"source": "devcontainer-history", | ||
"target": "/home/vscode/.history_export", | ||
"type": "volume" | ||
} | ||
] | ||
{ | ||
"source": "devcontainer-history", | ||
"target": "/home/vscode/.history_export", | ||
"type": "volume" | ||
} | ||
] | ||
} |
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 @@ | ||
jinja2 |
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
Oops, something went wrong.