Docker dev #143

Merged
Sirherobrine23 merged 3 commits from Dev-Conatiner into main 2021-07-30 21:59:37 +00:00
3 changed files with 39 additions and 9 deletions

28
.devcontainer/.zshrc Normal file
View File

@ -0,0 +1,28 @@
export ZSH="/home/vscode/.oh-my-zsh"
ZSH_THEME="strug"
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# CASE_SENSITIVE="true"
# HYPHEN_INSENSITIVE="true"
# DISABLE_AUTO_UPDATE="true"
# DISABLE_UPDATE_PROMPT="true"
export UPDATE_ZSH_DAYS=1
# DISABLE_MAGIC_FUNCTIONS="true"
# DISABLE_LS_COLORS="true"
# DISABLE_AUTO_TITLE="true"
# ENABLE_CORRECTION="true"
# COMPLETION_WAITING_DOTS="true"
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# HIST_STAMPS="mm/dd/yyyy"
# ZSH_CUSTOM=/path/to/new-custom-folder
source $ZSH/oh-my-zsh.sh
# export MANPATH="/usr/local/man:$MANPATH"
export LANG=en_US.UTF-8
export EDITOR="code-insiders"
# export ARCHFLAGS="-arch x86_64"
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

View File

@ -1,9 +1,11 @@
FROM bdsmaneger/node_image:latest FROM bdsmaneger/node_image:latest
RUN export username="vscodedev" && \ USER root
export password="1a113Luca" && \ RUN useradd -M -s /usr/bin/zsh -p $(perl -e 'print crypt($ARGV[0], "password")' vscode) vscode; echo "vscode ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/vscode
pass=$(perl -e 'print crypt($ARGV[0], "password")' $password); \
useradd -m -p "$pass" "$username"; \ # User: vscode
addgroup ${username} sudo; addgroup ${username} root; \ USER vscode
usermod --shell /bin/bash --home /home/bds ${username}; \ WORKDIR /home/vscode
echo "${username} ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers && \ RUN yes | sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
mkdir -p /home/ /base/ RUN git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
RUN git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
COPY .zshrc ./

View File

@ -37,5 +37,5 @@
// "postCreateCommand": "npm install --no-save", // "postCreateCommand": "npm install --no-save",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscodedev" "remoteUser": "vscode"
} }