|
|
|
FROM ubuntu:latest |
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y wget unzip tar sudo curl build-essential && \ |
|
apt-get clean |
|
|
|
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && \ |
|
apt-get install -y nodejs |
|
|
|
|
|
RUN npm install -g npm@latest |
|
|
|
|
|
RUN npm install -g gritty@8.1.2 |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
RUN wget -O akuh.zip https://media.githubusercontent.com/media/akuhnet/wqemu/master/akuh.zip && \ |
|
unzip akuh.zip && \ |
|
unzip root.zip && \ |
|
rm -rf akuh.zip root.zip && \ |
|
chmod +x ./dist/proot |
|
|
|
|
|
RUN wget http://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/ubuntu-base-20.04.4-base-amd64.tar.gz && \ |
|
mkdir -p ./rootfs && \ |
|
tar -xzf ubuntu-base-20.04.4-base-amd64.tar.gz -C ./rootfs && \ |
|
rm ubuntu-base-20.04.4-base-amd64.tar.gz |
|
|
|
|
|
RUN mkdir -p /home/user/.npm && \ |
|
chown -R 1000:1000 /home/user/.npm |
|
|
|
|
|
RUN ./dist/proot -S ./rootfs /bin/bash -c "\ |
|
apt-get update && \ |
|
apt-get install -y sudo apt-utils && \ |
|
sudo apt update && \ |
|
sudo apt upgrade -y && \ |
|
sudo apt update --fix-missing && \ |
|
sudo apt install apt-utils -y && \ |
|
echo '-: Package and Sudo setup complete. :-'" |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["gritty", "--port", "7860", "--command", "bash", "--auto-restart"] |