|
1 | | -#------------------------------------------------------------------------------------------------------------- |
2 | | -# Copyright (c) Microsoft Corporation. All rights reserved. |
3 | | -# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. |
4 | | -#------------------------------------------------------------------------------------------------------------- |
5 | | - |
6 | | -FROM node:8 |
7 | | - |
8 | | -# Avoid warnings by switching to noninteractive |
9 | | -ENV DEBIAN_FRONTEND=noninteractive |
10 | | - |
11 | | -# The node image comes with a base non-root 'node' user which this Dockerfile |
12 | | -# gives sudo access. However, for Linux, this user's GID/UID must match your local |
13 | | -# user UID/GID to avoid permission issues with bind mounts. Update USER_UID / USER_GID |
14 | | -# if yours is not 1000. See https://aka.ms/vscode-remote/containers/non-root-user. |
15 | | -ARG USER_UID=1000 |
16 | | -ARG USER_GID=$USER_UID |
17 | | - |
18 | | -# Configure apt and install packages |
19 | | -RUN apt-get update \ |
20 | | - && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \ |
21 | | - # |
22 | | - # Verify git and needed tools are installed |
23 | | - && apt-get -y install git iproute2 procps \ |
24 | | - # |
25 | | - # Remove outdated yarn from /opt and install via package |
26 | | - # so it can be easily updated via apt-get upgrade yarn |
27 | | - && rm -rf /opt/yarn-* \ |
28 | | - && rm -f /usr/local/bin/yarn \ |
29 | | - && rm -f /usr/local/bin/yarnpkg \ |
30 | | - && apt-get install -y curl apt-transport-https lsb-release \ |
31 | | - && curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \ |
32 | | - && echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ |
33 | | - && apt-get update \ |
34 | | - && apt-get -y install --no-install-recommends yarn \ |
35 | | - # |
36 | | - # Install tslint and typescript globally |
37 | | - && npm install -g tslint typescript \ |
38 | | - # |
39 | | - # [Optional] Update a non-root user to match UID/GID - see https://aka.ms/vscode-remote/containers/non-root-user. |
40 | | - && if [ "$USER_GID" != "1000" ]; then groupmod node --gid $USER_GID; fi \ |
41 | | - && if [ "$USER_UID" != "1000" ]; then usermod --uid $USER_UID node; fi \ |
42 | | - # [Optional] Add add sudo support for non-root user |
43 | | - && apt-get install -y sudo \ |
44 | | - && echo node ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/node \ |
45 | | - && chmod 0440 /etc/sudoers.d/node \ |
46 | | - # |
47 | | - # Clean up |
48 | | - && apt-get autoremove -y \ |
49 | | - && apt-get clean -y \ |
50 | | - && rm -rf /var/lib/apt/lists/* |
51 | | - |
52 | | -# Switch back to dialog for any ad-hoc use of apt-get |
53 | | -ENV DEBIAN_FRONTEND= |
| 1 | +#------------------------------------------------------------------------------------------------------------- |
| 2 | +# Copyright (c) Microsoft Corporation. All rights reserved. |
| 3 | +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. |
| 4 | +#------------------------------------------------------------------------------------------------------------- |
| 5 | + |
| 6 | +FROM node:8 |
| 7 | + |
| 8 | +# Avoid warnings by switching to noninteractive |
| 9 | +ENV DEBIAN_FRONTEND=noninteractive |
| 10 | + |
| 11 | +# The node image comes with a base non-root 'node' user which this Dockerfile |
| 12 | +# gives sudo access. However, for Linux, this user's GID/UID must match your local |
| 13 | +# user UID/GID to avoid permission issues with bind mounts. Update USER_UID / USER_GID |
| 14 | +# if yours is not 1000. See https://aka.ms/vscode-remote/containers/non-root-user. |
| 15 | +ARG USER_UID=1000 |
| 16 | +ARG USER_GID=$USER_UID |
| 17 | + |
| 18 | +# Configure apt and install packages |
| 19 | +RUN apt-get update \ |
| 20 | + && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \ |
| 21 | + # |
| 22 | + # Verify git and needed tools are installed |
| 23 | + && apt-get -y install git iproute2 procps \ |
| 24 | + # |
| 25 | + # Remove outdated yarn from /opt and install via package |
| 26 | + # so it can be easily updated via apt-get upgrade yarn |
| 27 | + && rm -rf /opt/yarn-* \ |
| 28 | + && rm -f /usr/local/bin/yarn \ |
| 29 | + && rm -f /usr/local/bin/yarnpkg \ |
| 30 | + && apt-get install -y curl apt-transport-https lsb-release \ |
| 31 | + && curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \ |
| 32 | + && echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ |
| 33 | + && apt-get update \ |
| 34 | + && apt-get -y install --no-install-recommends yarn \ |
| 35 | + # |
| 36 | + # Install tslint and typescript globally |
| 37 | + && npm install -g tslint typescript \ |
| 38 | + # |
| 39 | + # [Optional] Update a non-root user to match UID/GID - see https://aka.ms/vscode-remote/containers/non-root-user. |
| 40 | + && if [ "$USER_GID" != "1000" ]; then groupmod node --gid $USER_GID; fi \ |
| 41 | + && if [ "$USER_UID" != "1000" ]; then usermod --uid $USER_UID node; fi \ |
| 42 | + # [Optional] Add add sudo support for non-root user |
| 43 | + && apt-get install -y sudo \ |
| 44 | + && echo node ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/node \ |
| 45 | + && chmod 0440 /etc/sudoers.d/node \ |
| 46 | + # |
| 47 | + # Clean up |
| 48 | + && apt-get autoremove -y \ |
| 49 | + && apt-get clean -y \ |
| 50 | + && rm -rf /var/lib/apt/lists/* |
| 51 | + |
| 52 | +# Switch back to dialog for any ad-hoc use of apt-get |
| 53 | +ENV DEBIAN_FRONTEND= |
0 commit comments