Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Commit

Permalink
Start of build layer consolidation
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuxel committed Jun 11, 2019
1 parent 1c05448 commit 3133d72
Show file tree
Hide file tree
Showing 54 changed files with 913 additions and 684 deletions.
35 changes: 19 additions & 16 deletions container-templates/docker-compose/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,33 @@

# ********************************************************
# * Note: A Docker is optional when using Docker Compose *
# * but has been included here for completeness. *
# * but has been included here for completeness. *
# ********************************************************

# Debian and Ubuntu based images are supported. Alpine images are not yet supported.
FROM debian:9

# Configure apt
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1

# Install git, process tools, lsb-release (common in install instructions for CLIs)
RUN apt-get -y install git procps lsb-release

# *****************************************************
# * Add steps for installing needed dependencies here *
# *****************************************************
# Set the default shell to bash rather than sh
ENV SHELL /bin/bash

# Clean up
RUN apt-get autoremove -y \
# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
#
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
&& apt-get -y install git procps lsb-release \
#
# *****************************************************
# * Add steps for installing needed dependencies here *
# *****************************************************
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=dialog

# Set the default shell to bash rather than sh
ENV SHELL /bin/bash
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog

33 changes: 18 additions & 15 deletions container-templates/dockerfile/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,26 @@
# Debian and Ubuntu based images are supported. Alpine images are not yet supported.
FROM debian:9

# Configure apt
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1

# Install git, process tools, lsb-release (common in install instructions for CLIs)
RUN apt-get -y install git procps lsb-release

# *****************************************************
# * Add steps for installing needed dependencies here *
# ****************************************************
# Set the default shell to bash rather than sh
ENV SHELL /bin/bash

# Clean up
RUN apt-get autoremove -y \
# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
#
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
&& apt-get -y install git procps lsb-release \
#
# *****************************************************
# * Add steps for installing needed dependencies here *
# *****************************************************
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=dialog

# Set the default shell to bash rather than sh
ENV SHELL /bin/bash
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
78 changes: 41 additions & 37 deletions containers/azure-ansible/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
# Pick any base image, but if you select node, skip installing node. 😊
FROM debian:9

# Configure apt
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1
# Set the default shell to bash rather than sh
ENV SHELL /bin/bash

# Install git, required tools
RUN apt-get install -y \
# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
#
# Verify git, required tools installed
&& apt-get install -y \
git \
curl \
procps \
Expand All @@ -21,38 +25,38 @@ RUN apt-get install -y \
ca-certificates \
gnupg-agent \
software-properties-common \
lsb-release 2>&1

# [Optional] Install Node.js for Azure Cloud Shell support
# Change the "lts/*" in the two lines below to pick a different version
RUN curl -so- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash 2>&1 \
&& /bin/bash -c "source $HOME/.nvm/nvm.sh \
lsb-release 2>&1 \
#
# [Optional] Install Node.js for Azure Cloud Shell support
# Change the "lts/*" in the two lines below to pick a different version
&& curl -so- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash 2>&1 \
&& /bin/bash -c "source $HOME/.nvm/nvm.sh \
&& nvm install lts/* \
&& nvm alias default lts/*" 2>&1

# [Optional] For local testing instead of cloud shell
# Install Docker CE CLI.
RUN curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \
&& apt-get update \
&& apt-get install -y docker-ce-cli

# [Optional] For local testing instead of cloud shell
# Install the Azure CLI
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \
&& apt-get update \
&& apt-get install -y azure-cli

# Install Ansible
RUN apt-get install -y libssl-dev libffi-dev python-dev python-pip \
&& pip install ansible[azure]

# Clean up
RUN apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
&& nvm alias default lts/*" 2>&1 \
#
# [Optional] For local testing instead of cloud shell
# Install Docker CE CLI.
&& curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \
&& apt-get update \
&& apt-get install -y docker-ce-cli \
#
# [Optional] For local testing instead of cloud shell
# Install the Azure CLI
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \
&& apt-get update \
&& apt-get install -y azure-cli \
#
# Install Ansible
&& apt-get install -y libssl-dev libffi-dev python-dev python-pip \
&& pip install ansible[azure] \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog

# Set the default shell to bash instead of sh
ENV SHELL /bin/bash
53 changes: 28 additions & 25 deletions containers/azure-blockchain/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,39 @@

FROM python:2.7

# Configure apt
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1

# Install git, process tools
RUN apt-get -y install git procps

# Install nodejs
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get install -y nodejs

# Install Truffle Suite
RUN npm i --unsafe-perm -g truffle

# Install Ganache CLI
RUN npm install -g ganache-cli
# Set the default shell to bash rather than sh
ENV SHELL /bin/bash

# Install the Azure CLI
RUN apt-get install -y apt-transport-https curl gnupg2 lsb-release \
# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
#
# Verify git, process tools installed
&& apt-get -y install git procps \
#
# Install nodejs
&& curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get install -y nodejs \
#
# Install Truffle Suite
&& npm i --unsafe-perm -g truffle \
#
# Install Ganache CLI
&& npm install -g ganache-cli \
#
# Install the Azure CLI
&& apt-get install -y apt-transport-https curl gnupg2 lsb-release \
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \
&& apt-get update \
&& apt-get install -y azure-cli

# Clean up
RUN apt-get autoremove -y \
&& apt-get install -y azure-cli \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=dialog

# Set the default shell to bash instead of sh
ENV SHELL /bin/bash
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
33 changes: 18 additions & 15 deletions containers/azure-cli/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,29 @@

FROM debian:9

# Configure apt
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1

# Install git, process tools
RUN apt-get -y install git procps
# Set the default shell to bash rather than sh
ENV SHELL /bin/bash

# Install the Azure CLI
RUN apt-get install -y apt-transport-https curl gnupg2 lsb-release \
# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
#
# Verify git, process tools installed
&& apt-get -y install git procps \
#
# Install the Azure CLI
&& apt-get install -y apt-transport-https curl gnupg2 lsb-release \
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \
&& apt-get update \
&& apt-get install -y azure-cli

# Clean up
RUN apt-get autoremove -y \
&& apt-get install -y azure-cli \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=dialog

# Set the default shell to bash instead of sh
ENV SHELL /bin/bash
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
35 changes: 19 additions & 16 deletions containers/azure-functions-dotnetcore-2.1/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,35 @@

FROM mcr.microsoft.com/dotnet/core/sdk:2.1

# Configure apt
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1
# Set the default shell to bash rather than sh
ENV SHELL /bin/bash

# Verify git and needed tools are installed
RUN apt-get -y install \
# Configure apt and install packages
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
#
# Verify git and needed tools are installed
&& apt-get -y install \
git \
procps \
curl \
apt-transport-https \
gnupg2 \
lsb-release

# Install Azure Functions and Azure CLI
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
lsb-release \
#
# Install Azure Functions and Azure CLI
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-$(lsb_release -cs)-prod $(lsb_release -cs) main" > /etc/apt/sources.list.d/dotnetdev.list \
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | (OUT=$(apt-key add - 2>&1) || echo $OUT) \
&& apt-get update \
&& apt-get install -y azure-cli azure-functions-core-tools

# Clean up
RUN apt-get autoremove -y \
&& apt-get install -y azure-cli azure-functions-core-tools \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
ENV DEBIAN_FRONTEND=dialog

# Set the default shell to bash instead of sh
ENV SHELL /bin/bash
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
Loading

0 comments on commit 3133d72

Please sign in to comment.