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

Commit 3d6210a

Browse files
authored
Merge pull request #81 from microsoft/layer-consolidation
General layer consolidation in definitions and templates
2 parents 4e07318 + 943a66a commit 3d6210a

File tree

65 files changed

+1121
-795
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+1121
-795
lines changed

container-templates/docker-compose/.devcontainer/Dockerfile

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,33 @@
55

66
# ********************************************************
77
# * Note: A Docker is optional when using Docker Compose *
8-
# * but has been included here for completeness. *
8+
# * but has been included here for completeness. *
99
# ********************************************************
1010

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

14-
# Configure apt
14+
# Avoid warnings by switching to noninteractive
1515
ENV DEBIAN_FRONTEND=noninteractive
16-
RUN apt-get update \
17-
&& apt-get -y install --no-install-recommends apt-utils 2>&1
18-
19-
# Install git, process tools, lsb-release (common in install instructions for CLIs)
20-
RUN apt-get -y install git procps lsb-release
21-
22-
# *****************************************************
23-
# * Add steps for installing needed dependencies here *
24-
# *****************************************************
16+
# Set the default shell to bash rather than sh
17+
ENV SHELL /bin/bash
2518

26-
# Clean up
27-
RUN apt-get autoremove -y \
19+
# Configure apt and install packages
20+
RUN apt-get update \
21+
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
22+
#
23+
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
24+
&& apt-get -y install git procps lsb-release \
25+
#
26+
# *****************************************************
27+
# * Add steps for installing needed dependencies here *
28+
# *****************************************************
29+
#
30+
# Clean up
31+
&& apt-get autoremove -y \
2832
&& apt-get clean -y \
2933
&& rm -rf /var/lib/apt/lists/*
30-
ENV DEBIAN_FRONTEND=dialog
3134

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

container-templates/dockerfile/.devcontainer/Dockerfile

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,26 @@
66
# Debian and Ubuntu based images are supported. Alpine images are not yet supported.
77
FROM debian:9
88

9-
# Configure apt
9+
# Avoid warnings by switching to noninteractive
1010
ENV DEBIAN_FRONTEND=noninteractive
11-
RUN apt-get update \
12-
&& apt-get -y install --no-install-recommends apt-utils 2>&1
13-
14-
# Install git, process tools, lsb-release (common in install instructions for CLIs)
15-
RUN apt-get -y install git procps lsb-release
16-
17-
# *****************************************************
18-
# * Add steps for installing needed dependencies here *
19-
# ****************************************************
11+
# Set the default shell to bash rather than sh
12+
ENV SHELL /bin/bash
2013

21-
# Clean up
22-
RUN apt-get autoremove -y \
14+
# Configure apt and install packages
15+
RUN apt-get update \
16+
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
17+
#
18+
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
19+
&& apt-get -y install git procps lsb-release \
20+
#
21+
# *****************************************************
22+
# * Add steps for installing needed dependencies here *
23+
# *****************************************************
24+
#
25+
# Clean up
26+
&& apt-get autoremove -y \
2327
&& apt-get clean -y \
2428
&& rm -rf /var/lib/apt/lists/*
25-
ENV DEBIAN_FRONTEND=dialog
2629

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

containers/azure-ansible/.devcontainer/Dockerfile

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@
66
# Pick any base image, but if you select node, skip installing node. 😊
77
FROM debian:9
88

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

14-
# Install git, required tools
15-
RUN apt-get install -y \
14+
# Configure apt and install packages
15+
RUN apt-get update \
16+
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
17+
#
18+
# Verify git, required tools installed
19+
&& apt-get install -y \
1620
git \
1721
curl \
1822
procps \
@@ -21,38 +25,38 @@ RUN apt-get install -y \
2125
ca-certificates \
2226
gnupg-agent \
2327
software-properties-common \
24-
lsb-release 2>&1
25-
26-
# [Optional] Install Node.js for Azure Cloud Shell support
27-
# Change the "lts/*" in the two lines below to pick a different version
28-
RUN curl -so- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash 2>&1 \
29-
&& /bin/bash -c "source $HOME/.nvm/nvm.sh \
28+
lsb-release 2>&1 \
29+
#
30+
# [Optional] Install Node.js for Azure Cloud Shell support
31+
# Change the "lts/*" in the two lines below to pick a different version
32+
&& curl -so- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash 2>&1 \
33+
&& /bin/bash -c "source $HOME/.nvm/nvm.sh \
3034
&& nvm install lts/* \
31-
&& nvm alias default lts/*" 2>&1
32-
33-
# [Optional] For local testing instead of cloud shell
34-
# Install Docker CE CLI.
35-
RUN curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \
36-
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \
37-
&& apt-get update \
38-
&& apt-get install -y docker-ce-cli
39-
40-
# [Optional] For local testing instead of cloud shell
41-
# Install the Azure CLI
42-
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
43-
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \
44-
&& apt-get update \
45-
&& apt-get install -y azure-cli
46-
47-
# Install Ansible
48-
RUN apt-get install -y libssl-dev libffi-dev python-dev python-pip \
49-
&& pip install ansible[azure]
50-
51-
# Clean up
52-
RUN apt-get autoremove -y \
53-
&& apt-get clean -y \
54-
&& rm -rf /var/lib/apt/lists/*
35+
&& nvm alias default lts/*" 2>&1 \
36+
#
37+
# [Optional] For local testing instead of cloud shell
38+
# Install Docker CE CLI.
39+
&& curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \
40+
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \
41+
&& apt-get update \
42+
&& apt-get install -y docker-ce-cli \
43+
#
44+
# [Optional] For local testing instead of cloud shell
45+
# Install the Azure CLI
46+
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
47+
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \
48+
&& apt-get update \
49+
&& apt-get install -y azure-cli \
50+
#
51+
# Install Ansible
52+
&& apt-get install -y libssl-dev libffi-dev python-dev python-pip \
53+
&& pip install ansible[azure] \
54+
#
55+
# Clean up
56+
&& apt-get autoremove -y \
57+
&& apt-get clean -y \
58+
&& rm -rf /var/lib/apt/lists/*
59+
60+
# Switch back to dialog for any ad-hoc use of apt-get
5561
ENV DEBIAN_FRONTEND=dialog
5662

57-
# Set the default shell to bash instead of sh
58-
ENV SHELL /bin/bash

containers/azure-blockchain/.devcontainer/Dockerfile

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,39 @@
55

66
FROM python:2.7
77

8-
# Configure apt
8+
# Avoid warnings by switching to noninteractive
99
ENV DEBIAN_FRONTEND=noninteractive
10-
RUN apt-get update \
11-
&& apt-get -y install --no-install-recommends apt-utils 2>&1
12-
13-
# Install git, process tools
14-
RUN apt-get -y install git procps
15-
16-
# Install nodejs
17-
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
18-
&& apt-get install -y nodejs
19-
20-
# Install Truffle Suite
21-
RUN npm i --unsafe-perm -g truffle
22-
23-
# Install Ganache CLI
24-
RUN npm install -g ganache-cli
10+
# Set the default shell to bash rather than sh
11+
ENV SHELL /bin/bash
2512

26-
# Install the Azure CLI
27-
RUN apt-get install -y apt-transport-https curl gnupg2 lsb-release \
13+
# Configure apt and install packages
14+
RUN apt-get update \
15+
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
16+
#
17+
# Verify git, process tools installed
18+
&& apt-get -y install git procps \
19+
#
20+
# Install nodejs
21+
&& curl -sL https://deb.nodesource.com/setup_10.x | bash - \
22+
&& apt-get install -y nodejs \
23+
#
24+
# Install Truffle Suite
25+
&& npm i --unsafe-perm -g truffle \
26+
#
27+
# Install Ganache CLI
28+
&& npm install -g ganache-cli \
29+
#
30+
# Install the Azure CLI
31+
&& apt-get install -y apt-transport-https curl gnupg2 lsb-release \
2832
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
2933
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \
3034
&& apt-get update \
31-
&& apt-get install -y azure-cli
32-
33-
# Clean up
34-
RUN apt-get autoremove -y \
35+
&& apt-get install -y azure-cli \
36+
#
37+
# Clean up
38+
&& apt-get autoremove -y \
3539
&& apt-get clean -y \
3640
&& rm -rf /var/lib/apt/lists/*
37-
ENV DEBIAN_FRONTEND=dialog
3841

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

containers/azure-cli/.devcontainer/Dockerfile

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,29 @@
55

66
FROM debian:9
77

8-
# Configure apt
8+
# Avoid warnings by switching to noninteractive
99
ENV DEBIAN_FRONTEND=noninteractive
10-
RUN apt-get update \
11-
&& apt-get -y install --no-install-recommends apt-utils 2>&1
12-
13-
# Install git, process tools
14-
RUN apt-get -y install git procps
10+
# Set the default shell to bash rather than sh
11+
ENV SHELL /bin/bash
1512

16-
# Install the Azure CLI
17-
RUN apt-get install -y apt-transport-https curl gnupg2 lsb-release \
13+
# Configure apt and install packages
14+
RUN apt-get update \
15+
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
16+
#
17+
# Verify git, process tools installed
18+
&& apt-get -y install git procps \
19+
#
20+
# Install the Azure CLI
21+
&& apt-get install -y apt-transport-https curl gnupg2 lsb-release \
1822
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
1923
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 2>/dev/null \
2024
&& apt-get update \
21-
&& apt-get install -y azure-cli
22-
23-
# Clean up
24-
RUN apt-get autoremove -y \
25+
&& apt-get install -y azure-cli \
26+
#
27+
# Clean up
28+
&& apt-get autoremove -y \
2529
&& apt-get clean -y \
2630
&& rm -rf /var/lib/apt/lists/*
27-
ENV DEBIAN_FRONTEND=dialog
2831

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

containers/azure-functions-dotnetcore-2.1/.devcontainer/Dockerfile

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,35 @@
55

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

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

13-
# Verify git and needed tools are installed
14-
RUN apt-get -y install \
13+
# Configure apt and install packages
14+
RUN apt-get update \
15+
&& apt-get -y install --no-install-recommends apt-utils 2>&1 \
16+
#
17+
# Verify git and needed tools are installed
18+
&& apt-get -y install \
1519
git \
1620
procps \
1721
curl \
1822
apt-transport-https \
1923
gnupg2 \
20-
lsb-release
21-
22-
# Install Azure Functions and Azure CLI
23-
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
24+
lsb-release \
25+
#
26+
# Install Azure Functions and Azure CLI
27+
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \
2428
&& 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 \
2529
&& curl -sL https://packages.microsoft.com/keys/microsoft.asc | (OUT=$(apt-key add - 2>&1) || echo $OUT) \
2630
&& apt-get update \
27-
&& apt-get install -y azure-cli azure-functions-core-tools
28-
29-
# Clean up
30-
RUN apt-get autoremove -y \
31+
&& apt-get install -y azure-cli azure-functions-core-tools \
32+
#
33+
# Clean up
34+
&& apt-get autoremove -y \
3135
&& apt-get clean -y \
3236
&& rm -rf /var/lib/apt/lists/*
33-
ENV DEBIAN_FRONTEND=dialog
3437

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

0 commit comments

Comments
 (0)