Skip to content

Instantly share code, notes, and snippets.

@songlairui
Created June 11, 2019 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save songlairui/502ca842ed78c18576a7ba5a35d541b9 to your computer and use it in GitHub Desktop.
Save songlairui/502ca842ed78c18576a7ba5a35d541b9 to your computer and use it in GitHub Desktop.
VSCode 远程 Container 使用zsh
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
FROM node:lts
# Configure apt
ENV DEBIAN_FRONTEND=noninteractive
# 使用自定义源
COPY ./sources.list /etc/apt/sources.list
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils 2>&1
# Verify git and needed tools are installed
RUN apt-get install -y git procps
# Remove outdated yarn from /opt and install via package
# so it can be easily updated via apt-get upgrade yarn
RUN rm -rf /opt/yarn-* \
&& rm -f /usr/local/bin/yarn \
&& rm -f /usr/local/bin/yarnpkg \
&& apt-get install -y curl apt-transport-https lsb-release \
&& curl -sS https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/pubkey.gpg | apt-key add - 2>/dev/null \
&& echo "deb https://dl.yarnpkg.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get -y install --no-install-recommends yarn
# Install tslint and typescript
RUN npm install -g tslint typescript
# 安装 zsh
RUN apt-get install -y zsh
RUN wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh || true
# Clean up
# RUN 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 /usr/bin/zsh
ENV ZSH_THEME agnoster
CMD [ "zsh" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment