Last active
July 15, 2018 05:50
-
-
Save sr229/581959d87f11f33131116b7b82ff1e3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
apt-get update && \ | |
apt-get -y upgrade && \ | |
apt-get -y install sudo && \ | |
apt-get -y install \ | |
python \ | |
python3 \ | |
python3-pip \ | |
build-essential \ | |
clang \ | |
openjdk-7-jdk \ | |
wget \ | |
curl \ | |
zsh \ | |
unzip\ | |
openssh-server \ | |
openssh-client \ | |
bash \ | |
git; | |
npm i -g typescript | |
# Step 2 : add user | |
adduser --disabled-password --gecos '' theia && \ | |
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \ | |
echo "user ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/user && \ | |
chmod 0440 /etc/sudoers.d/user; | |
# Step 3: Add permissions | |
mkdir -p /home/project && \ | |
mkdir -p /.theia && \ | |
chmod g+rw /home && \ | |
mkdir -p /.theia && \ | |
mkdir -p /.npm && \ | |
chmod g+rw /.npm && chmod g+rw /.theia && chmod g+rw /home/project && \ | |
chown -R theia:theia /.npm && chown -R theia:theia /.theia && chown -R theia:theia /home/project; | |
chgrp -R 0 /home/theia && \ | |
chmod a+x /home/theia/entrypoint && \ | |
chmod -R g=u /home/theia && \ | |
chmod g=u /etc/passwd;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment