Skip to content

Instantly share code, notes, and snippets.

@sr229
Last active July 15, 2018 05:50
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 sr229/581959d87f11f33131116b7b82ff1e3f to your computer and use it in GitHub Desktop.
Save sr229/581959d87f11f33131116b7b82ff1e3f to your computer and use it in GitHub Desktop.
#!/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