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

Commit 5afc842

Browse files
committed

File tree

7 files changed

+63
-43
lines changed

7 files changed

+63
-43
lines changed

containers/azure-functions-node-8/.devcontainer/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

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

8-
# Install git, process tools, bash
9-
RUN apt-get update && apt-get -y install git procps
8+
# Verify git and needed tools are installed
9+
RUN apt-get update && apt-get -y install git curl tar procps
1010

1111
# Install Node.js via NVM - See https://github.com/creationix/nvm
1212
# Change the number "8" in the two lines below to pick a different version
@@ -18,6 +18,14 @@ RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh
1818
# Install eslint
1919
RUN /bin/bash -c "source $HOME/.nvm/nvm.sh && npm install -g eslint"
2020

21+
# Install latest yarn
22+
RUN curl -sfSLO --compressed "https://yarnpkg.com/latest.tar.gz" \
23+
&& rm -rf /opt/yarn-* \
24+
&& tar -xzf latest.tar.gz -C /opt/ \
25+
&& ln -snf /opt/yarn-v*/bin/yarn /usr/local/bin/yarn \
26+
&& ln -snf /opt/yarn-v*/bin/yarnpkg /usr/local/bin/yarnpkg \
27+
&& rm latest.tar.gz
28+
2129
# Install Azure Functions and Azure CLI
2230
RUN apt-get install -y apt-transport-https curl gnupg2 lsb-release \
2331
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \

containers/azure-functions-node-lts/.devcontainer/Dockerfile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

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

8-
# Install git, process tools, bash
9-
RUN apt-get update && apt-get -y install git procps
8+
# Verify git and needed tools are installed
9+
RUN apt-get update && apt-get -y install git curl tar procps
1010

1111
# Install Node.js via NVM - See https://github.com/creationix/nvm
1212
# Change the "lts/*" in the two lines below to pick a different version
@@ -18,6 +18,14 @@ RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh
1818
# Install eslint
1919
RUN /bin/bash -c "source $HOME/.nvm/nvm.sh && npm install -g eslint"
2020

21+
# Install latest yarn
22+
RUN curl -sfSLO --compressed "https://yarnpkg.com/latest.tar.gz" \
23+
&& rm -rf /opt/yarn-* \
24+
&& tar -xzf latest.tar.gz -C /opt/ \
25+
&& ln -snf /opt/yarn-v*/bin/yarn /usr/local/bin/yarn \
26+
&& ln -snf /opt/yarn-v*/bin/yarnpkg /usr/local/bin/yarnpkg \
27+
&& rm latest.tar.gz
28+
2129
# Install Azure Functions and Azure CLI
2230
RUN apt-get install -y apt-transport-https curl gnupg2 lsb-release \
2331
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/azure-cli.list \

containers/javascript-node-8/.devcontainer/Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ ENV DEBIAN_FRONTEND=noninteractive
1010
RUN apt-get update \
1111
&& apt-get -y install --no-install-recommends apt-utils 2>&1
1212

13-
# Verify git and process tools are installed
14-
RUN apt-get install -y git procps
13+
# Verify git and needed tools are installed
14+
RUN apt-get install -y git curl tar procps
1515

16-
# Install yarn
17-
RUN apt-get install -y curl apt-transport-https lsb-release \
18-
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \
19-
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
20-
&& apt-get update \
21-
&& apt-get -y install --no-install-recommends yarn
16+
# Update Yarn to latest
17+
# See https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#upgradingdowngrading-yarn
18+
RUN curl -sfSLO --compressed "https://yarnpkg.com/latest.tar.gz" \
19+
&& rm -rf /opt/yarn-* \
20+
&& tar -xzf latest.tar.gz -C /opt/ \
21+
&& ln -snf /opt/yarn-v*/bin/yarn /usr/local/bin/yarn \
22+
&& ln -snf /opt/yarn-v*/bin/yarnpkg /usr/local/bin/yarnpkg \
23+
&& rm latest.tar.gz
2224

2325
# Install eslint
2426
RUN npm install -g eslint

containers/javascript-node-lts-mongo/.devcontainer/Dockerfile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@ RUN apt-get update \
1313
# Verify git and process tools are installed
1414
RUN apt-get install -y git procps
1515

16-
# Install yarn
17-
RUN apt-get install -y curl apt-transport-https lsb-release \
18-
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \
19-
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
20-
&& apt-get update \
21-
&& apt-get -y install --no-install-recommends yarn
16+
# Update yarn
17+
RUN npm install -g yarn
2218

2319
# Install eslint
2420
RUN npm install -g eslint

containers/javascript-node-lts/.devcontainer/Dockerfile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@ ENV DEBIAN_FRONTEND=noninteractive
1010
RUN apt-get update \
1111
&& apt-get -y install --no-install-recommends apt-utils 2>&1
1212

13-
# Verify git and process tools are installed
14-
RUN apt-get install -y git procps
15-
16-
# Install yarn
17-
RUN apt-get install -y curl apt-transport-https lsb-release \
18-
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \
19-
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
20-
&& apt-get update \
21-
&& apt-get -y install --no-install-recommends yarn
13+
# Verify git and needed tools are installed
14+
RUN apt-get install -y git curl tar procps
2215

16+
# Update Yarn to latest
17+
# See https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#upgradingdowngrading-yarn
18+
RUN curl -sfSLO --compressed "https://yarnpkg.com/latest.tar.gz" \
19+
&& rm -rf /opt/yarn-* \
20+
&& tar -xzf latest.tar.gz -C /opt/ \
21+
&& ln -snf /opt/yarn-v*/bin/yarn /usr/local/bin/yarn \
22+
&& ln -snf /opt/yarn-v*/bin/yarnpkg /usr/local/bin/yarnpkg \
23+
&& rm latest.tar.gz
24+
2325
# Install eslint
2426
RUN npm install -g eslint
2527

containers/typescript-node-8/.devcontainer/Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ ENV DEBIAN_FRONTEND=noninteractive
1010
RUN apt-get update \
1111
&& apt-get -y install --no-install-recommends apt-utils 2>&1
1212

13-
# Verify git and process tools are installed
14-
RUN apt-get install -y git procps
13+
# Verify git and needed tools are installed
14+
RUN apt-get install -y git curl tar procps
1515

16-
# Install yarn
17-
RUN apt-get install -y curl apt-transport-https lsb-release \
18-
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \
19-
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
20-
&& apt-get update \
21-
&& apt-get -y install --no-install-recommends yarn
16+
# Update Yarn to latest
17+
# See https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#upgradingdowngrading-yarn
18+
RUN curl -sfSLO --compressed "https://yarnpkg.com/latest.tar.gz" \
19+
&& rm -rf /opt/yarn-* \
20+
&& tar -xzf latest.tar.gz -C /opt/ \
21+
&& ln -snf /opt/yarn-v*/bin/yarn /usr/local/bin/yarn \
22+
&& ln -snf /opt/yarn-v*/bin/yarnpkg /usr/local/bin/yarnpkg \
23+
&& rm latest.tar.gz
2224

2325
# Install tslint and typescript
2426
RUN npm install -g tslint typescript

containers/typescript-node-lts/.devcontainer/Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ ENV DEBIAN_FRONTEND=noninteractive
1010
RUN apt-get update \
1111
&& apt-get -y install --no-install-recommends apt-utils 2>&1
1212

13-
# Verify git and process tools are installed
14-
RUN apt-get install -y git procps
13+
# Verify git and needed tools are installed
14+
RUN apt-get install -y git curl tar procps
1515

16-
# Install yarn
17-
RUN apt-get install -y curl apt-transport-https lsb-release \
18-
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \
19-
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
20-
&& apt-get update \
21-
&& apt-get -y install --no-install-recommends yarn
16+
# Update Yarn to latest
17+
# See https://github.com/nodejs/docker-node/blob/master/docs/BestPractices.md#upgradingdowngrading-yarn
18+
RUN curl -sfSLO --compressed "https://yarnpkg.com/latest.tar.gz" \
19+
&& rm -rf /opt/yarn-* \
20+
&& tar -xzf latest.tar.gz -C /opt/ \
21+
&& ln -snf /opt/yarn-v*/bin/yarn /usr/local/bin/yarn \
22+
&& ln -snf /opt/yarn-v*/bin/yarnpkg /usr/local/bin/yarnpkg \
23+
&& rm latest.tar.gz
2224

2325
# Install tslint and typescript
2426
RUN npm install -g tslint typescript

0 commit comments

Comments
 (0)