Last active
February 1, 2021 13:10
-
-
Save maximivanov/a8d61269e047872fe9cc86128e8101ea to your computer and use it in GitHub Desktop.
Utility Docker image to develop and deploy Azure Functions in Node.js with Terraform. zsh, ohmyzsh, powerlevel10k.
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
# Usage | |
# docker build -t maxivanov/az-dev-img - < Dockerfile | |
# docker run -it --rm maxivanov/az-dev-img | |
# | |
# az --version | |
# func --version | |
# node --version | |
# npm --version | |
# terraform --version | |
FROM node:14 | |
WORKDIR /var/downloads | |
RUN apt-get update && \ | |
apt-get install -y \ | |
# fix "add-apt-repository: command not found" | |
ca-certificates \ | |
# fix "apt-add-repository: not found" | |
software-properties-common \ | |
zsh | |
# https://github.com/ohmyzsh/ohmyzsh | |
# https://github.com/romkatv/powerlevel10k#manual | |
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \ | |
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k && \ | |
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc && \ | |
echo 'source ~/.p10k.zsh' >>~/.zshrc | |
# https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt | |
RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash | |
# https://github.com/Azure/azure-functions-core-tools#v3-1 | |
RUN npm i -g azure-functions-core-tools@3 --unsafe-perm true | |
# https://www.terraform.io/docs/cli/install/apt.html | |
RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - && \ | |
apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main" && \ | |
apt update && \ | |
apt install terraform | |
# https://www.terraform.io/downloads.html | |
# RUN wget https://releases.hashicorp.com/terraform/0.14.3/terraform_0.14.3_linux_amd64.zip && \ | |
# unzip -d terraform terraform_0.14.3_linux_amd64.zip && rm terraform_0.14.3_linux_amd64.zip && \ | |
# mv terraform/terraform /usr/local/bin/ && \ | |
# rm -rf terraform | |
# https://terragrunt.gruntwork.io/docs/getting-started/install/ | |
RUN wget https://github.com/gruntwork-io/terragrunt/releases/download/v0.27.1/terragrunt_linux_amd64 && \ | |
chmod u+x terragrunt_linux_amd64 && \ | |
mv terragrunt_linux_amd64 /usr/local/bin/terragrunt | |
WORKDIR /var/app | |
CMD [ "zsh" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment