|
| 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 ruby:2 |
| 7 | + |
| 8 | +# Avoid warnings by switching to noninteractive |
| 9 | +ENV DEBIAN_FRONTEND=noninteractive |
| 10 | + |
| 11 | +# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser" |
| 12 | +# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs |
| 13 | +# will be updated to match your local UID/GID (when using the dockerFile property). |
| 14 | +# See https://aka.ms/vscode-remote/containers/non-root-user for details. |
| 15 | +ARG USERNAME=vscode |
| 16 | +ARG USER_UID=1000 |
| 17 | +ARG USER_GID=$USER_UID |
| 18 | + |
| 19 | +# Configure apt and install packages |
| 20 | +RUN apt-get update \ |
| 21 | + && apt-get -y install --no-install-recommends apt-utils dialog locales 2>&1 \ |
| 22 | + # Verify git, process tools installed |
| 23 | + && apt-get -y install git openssh-client iproute2 procps lsb-release \ |
| 24 | + # |
| 25 | + # Install ruby-debug-ide and debase |
| 26 | + && gem install ruby-debug-ide \ |
| 27 | + && gem install debase \ |
| 28 | + # |
| 29 | + # Install node.js |
| 30 | + && apt-get -y install curl software-properties-common \ |
| 31 | + && curl -sL https://deb.nodesource.com/setup_13.x | bash - \ |
| 32 | + && apt-get -y install nodejs \ |
| 33 | + # |
| 34 | + # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user. |
| 35 | + && groupadd --gid $USER_GID $USERNAME \ |
| 36 | + && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ |
| 37 | + # [Optional] Add sudo support for the non-root user |
| 38 | + && apt-get install -y sudo \ |
| 39 | + && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\ |
| 40 | + && chmod 0440 /etc/sudoers.d/$USERNAME \ |
| 41 | + # |
| 42 | + # Clean up |
| 43 | + && apt-get autoremove -y \ |
| 44 | + && apt-get clean -y \ |
| 45 | + && rm -rf /var/lib/apt/lists/* |
| 46 | + |
| 47 | +# Set the locale |
| 48 | +RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ |
| 49 | + dpkg-reconfigure --frontend=noninteractive locales && \ |
| 50 | + update-locale LANG=en_US.UTF-8 |
| 51 | + |
| 52 | +ENV LANG en_US.UTF-8 |
| 53 | + |
| 54 | +# Switch back to dialog for any ad-hoc use of apt-get |
| 55 | +ENV DEBIAN_FRONTEND=dialog |
0 commit comments