Skip to content

Commit

Permalink
ADD theia-pincer
Browse files Browse the repository at this point in the history
  • Loading branch information
wabscale committed Sep 25, 2023
1 parent a94333c commit 78a777c
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ services:
image: registry.digitalocean.com/anubis/theia-osiris:latest
build: ./theia-osiris

## Course specific images
# Image for OSIRIS
theia-pincer:
image: registry.digitalocean.com/anubis/theia-pincer:latest
build: ./theia-pincer

# Image for CompArch & PL with Epstein
theia-jepst:
image: registry.digitalocean.com/anubis/theia-jepst:latest
Expand Down
2 changes: 2 additions & 0 deletions theia-pincer/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.tar.gz
venv
82 changes: 82 additions & 0 deletions theia-pincer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# https://github.com/theia-ide/theia-apps/tree/master/theia-cpp-docker

FROM node:16 as code-debug-visx

SHELL ["/bin/bash", "-c"]

RUN set -eux; \
apt update; \
apt --assume-yes install git build-essential; \
git clone https://github.com/WebFreak001/code-debug; \
cd code-debug; \
npm clean-install --no-optional; \
npx vsce package --out /webfreak-debug.vsix


FROM node:16 as pincer-visx

SHELL ["/bin/bash", "-c"]

RUN set -eux; \
apt update; \
apt --assume-yes install git build-essential; \
git clone https://github.com/synoet/pincer.git; \
cd pincer/extension; \
npm clean-install --no-optional; \
npx vsce package --out /pincer.vsix


FROM registry.digitalocean.com/anubis/theia-base:python-3.10 as theia

ARG USER=anubis
ARG GDB_VERSION=13.2

COPY --from=code-debug-visx /webfreak-debug.vsix /opt/code-server/webfreak-debug.vsix
COPY --from=pincer-visx /pincer.vsix /opt/code-server/pincer.vsix

USER root
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
git make cmake strace \
gcc-multilib g++-multilib libc6-dev \
clangd clang-format qemu-system-i386 libgmp-dev libexpat-dev \
nasm ninja-build; \
cd /; \
\
`# Install extensions` \
code-server --user-data-dir=/opt/code-server --install-extension ms-vscode.cmake-tools; \
code-server --user-data-dir=/opt/code-server --install-extension llvm-vs-code-extensions.vscode-clangd; \
code-server --user-data-dir=/opt/code-server --install-extension 13xforever.language-x86-64-assembly; \
\
`# Install built extensions` \
code-server --user-data-dir=/opt/code-server --install-extension /opt/code-server/webfreak-debug.vsix; \
code-server --user-data-dir=/opt/code-server --install-extension /opt/code-server/pincer.vsix; \
\
`# We compile our own gdb like this so that it does not install the system python3` \
wget https://ftp.gnu.org/gnu/gdb/gdb-${GDB_VERSION}.tar.xz; \
tar xJf gdb-${GDB_VERSION}.tar.xz; \
rm gdb-${GDB_VERSION}.tar.xz; \
cd gdb-${GDB_VERSION}; \
./configure --with-python=python3.10 --prefix=/usr/ --with-expat; \
make -j $(nproc); \
make install; \
cd ..; \
rm -rf gdb-${GDB_VERSION}; \
\
echo 'set auto-load safe-path /' > /etc/anubis/skel/.gdbinit; \
echo 'source /opt/pwndbg/gdbinit.py' >> /etc/anubis/skel/.gdbinit; \
git clone https://github.com/pwndbg/pwndbg.git /opt/pwndbg; \
cd /opt/pwndbg; \
git submodule update --init --recursive; \
pip3 install --no-cache-dir -e /opt/pwndbg; \
rm -rf /tmp/*; \
rm -rf /usr/share/doc; \
rm -rf /var/lib/apt/lists/*; \
rm -rf /home/node/*; \
find / -depth \
\( -name .cache -o -name __pycache__ -o -name '*.pyc' -o -name .git -o -name .github \) \
-exec 'rm' '-rf' '{}' '+'; \
chown -R ${USER}:${USER} /home/anubis

USER anubis

0 comments on commit 78a777c

Please sign in to comment.