From 297ad660d6ff746eea4f7aefc0ab6f8e0006e9fa Mon Sep 17 00:00:00 2001 From: Micheal Waltz Date: Fri, 4 Oct 2019 15:07:56 -0700 Subject: [PATCH 1/2] Add azure-cli versions 0.10.18, 0.10.19, 0.10.20, use node:6-slim image to reduce image size and avoid extra commands, change entrypoint to azure --- 0.10.18/Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ 0.10.18/README.md | 5 +++++ 0.10.19/Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ 0.10.19/README.md | 5 +++++ 0.10.20/Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ 0.10.20/README.md | 5 +++++ 6 files changed, 126 insertions(+) create mode 100644 0.10.18/Dockerfile create mode 100644 0.10.18/README.md create mode 100644 0.10.19/Dockerfile create mode 100644 0.10.19/README.md create mode 100644 0.10.20/Dockerfile create mode 100644 0.10.20/README.md diff --git a/0.10.18/Dockerfile b/0.10.18/Dockerfile new file mode 100644 index 0000000..3c3b234 --- /dev/null +++ b/0.10.18/Dockerfile @@ -0,0 +1,37 @@ +FROM node:6-slim + +RUN rm /bin/sh && ln -s /bin/bash /bin/sh + +ENV AZURE_CLI_VERSION="0.10.18" \ + EDITOR=vim + +RUN apt-get update -qq && \ + apt-get install -qqy --no-install-recommends \ + apt-transport-https \ + build-essential \ + curl \ + ca-certificates \ + git \ + lsb-release \ + python-all \ + rlwrap \ + vim \ + nano \ + jq + +#Run as non-root node user +WORKDIR /home/node/ +RUN mkdir -p /home/node/app /home/node/.npm-global && \ + chown -R node:node /home/node +ENV PATH=/home/node/.npm-global/bin:$PATH \ + NPM_CONFIG_PREFIX=/home/node/.npm-global + +USER node +RUN npm install --global azure-cli@${AZURE_CLI_VERSION} && \ + azure --completion >> ~/azure.completion.sh && \ + echo 'source ~/azure.completion.sh' >> ~/.bashrc && \ + azure + +RUN azure config mode arm + +ENTRYPOINT ["azure"] diff --git a/0.10.18/README.md b/0.10.18/README.md new file mode 100644 index 0000000..20c1653 --- /dev/null +++ b/0.10.18/README.md @@ -0,0 +1,5 @@ +# Microsoft Azure CLI Docker Image + +This Docker image has Microsoft Azure CLI installed and prepared. To run it, execute: + + $ docker run -it microsoft/azure-cli diff --git a/0.10.19/Dockerfile b/0.10.19/Dockerfile new file mode 100644 index 0000000..19210b5 --- /dev/null +++ b/0.10.19/Dockerfile @@ -0,0 +1,37 @@ +FROM node:6-slim + +RUN rm /bin/sh && ln -s /bin/bash /bin/sh + +ENV AZURE_CLI_VERSION="0.10.19" \ + EDITOR=vim + +RUN apt-get update -qq && \ + apt-get install -qqy --no-install-recommends \ + apt-transport-https \ + build-essential \ + curl \ + ca-certificates \ + git \ + lsb-release \ + python-all \ + rlwrap \ + vim \ + nano \ + jq + +#Run as non-root node user +WORKDIR /home/node/ +RUN mkdir -p /home/node/app /home/node/.npm-global && \ + chown -R node:node /home/node +ENV PATH=/home/node/.npm-global/bin:$PATH \ + NPM_CONFIG_PREFIX=/home/node/.npm-global + +USER node +RUN npm install --global azure-cli@${AZURE_CLI_VERSION} && \ + azure --completion >> ~/azure.completion.sh && \ + echo 'source ~/azure.completion.sh' >> ~/.bashrc && \ + azure + +RUN azure config mode arm + +ENTRYPOINT ["azure"] diff --git a/0.10.19/README.md b/0.10.19/README.md new file mode 100644 index 0000000..20c1653 --- /dev/null +++ b/0.10.19/README.md @@ -0,0 +1,5 @@ +# Microsoft Azure CLI Docker Image + +This Docker image has Microsoft Azure CLI installed and prepared. To run it, execute: + + $ docker run -it microsoft/azure-cli diff --git a/0.10.20/Dockerfile b/0.10.20/Dockerfile new file mode 100644 index 0000000..ac9131d --- /dev/null +++ b/0.10.20/Dockerfile @@ -0,0 +1,37 @@ +FROM node:6-slim + +RUN rm /bin/sh && ln -s /bin/bash /bin/sh + +ENV AZURE_CLI_VERSION="0.10.20" \ + EDITOR=vim + +RUN apt-get update -qq && \ + apt-get install -qqy --no-install-recommends \ + apt-transport-https \ + build-essential \ + curl \ + ca-certificates \ + git \ + lsb-release \ + python-all \ + rlwrap \ + vim \ + nano \ + jq + +#Run as non-root node user +WORKDIR /home/node/ +RUN mkdir -p /home/node/app /home/node/.npm-global && \ + chown -R node:node /home/node +ENV PATH=/home/node/.npm-global/bin:$PATH \ + NPM_CONFIG_PREFIX=/home/node/.npm-global + +USER node +RUN npm install --global azure-cli@${AZURE_CLI_VERSION} && \ + azure --completion >> ~/azure.completion.sh && \ + echo 'source ~/azure.completion.sh' >> ~/.bashrc && \ + azure + +RUN azure config mode arm + +ENTRYPOINT ["azure"] diff --git a/0.10.20/README.md b/0.10.20/README.md new file mode 100644 index 0000000..20c1653 --- /dev/null +++ b/0.10.20/README.md @@ -0,0 +1,5 @@ +# Microsoft Azure CLI Docker Image + +This Docker image has Microsoft Azure CLI installed and prepared. To run it, execute: + + $ docker run -it microsoft/azure-cli From a4087c2b215cc21062200611262f5d78b6a81086 Mon Sep 17 00:00:00 2001 From: Micheal Waltz Date: Fri, 4 Oct 2019 15:12:13 -0700 Subject: [PATCH 2/2] Add zip package - fixes #56 --- 0.10.18/Dockerfile | 3 ++- 0.10.19/Dockerfile | 3 ++- 0.10.20/Dockerfile | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/0.10.18/Dockerfile b/0.10.18/Dockerfile index 3c3b234..57870f2 100644 --- a/0.10.18/Dockerfile +++ b/0.10.18/Dockerfile @@ -17,7 +17,8 @@ RUN apt-get update -qq && \ rlwrap \ vim \ nano \ - jq + jq \ + zip #Run as non-root node user WORKDIR /home/node/ diff --git a/0.10.19/Dockerfile b/0.10.19/Dockerfile index 19210b5..2ba93d1 100644 --- a/0.10.19/Dockerfile +++ b/0.10.19/Dockerfile @@ -17,7 +17,8 @@ RUN apt-get update -qq && \ rlwrap \ vim \ nano \ - jq + jq \ + zip #Run as non-root node user WORKDIR /home/node/ diff --git a/0.10.20/Dockerfile b/0.10.20/Dockerfile index ac9131d..c8e89d4 100644 --- a/0.10.20/Dockerfile +++ b/0.10.20/Dockerfile @@ -17,7 +17,8 @@ RUN apt-get update -qq && \ rlwrap \ vim \ nano \ - jq + jq \ + zip #Run as non-root node user WORKDIR /home/node/