Init gitpod

This commit is contained in:
Lisanna Dettwyler 2021-05-25 13:40:59 +00:00
parent 2611733c46
commit 7ed5b5c700
2 changed files with 41 additions and 0 deletions

12
.gitpod.Dockerfile vendored Normal file
View File

@ -0,0 +1,12 @@
FROM gitpod/workspace-full
USER root
# Install Dropbear SSH server
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -yq \
dropbear \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*
# Install Chisel
RUN curl https://i.jpillora.com/chisel! | bash

29
.gitpod.yml Normal file
View File

@ -0,0 +1,29 @@
image:
file: .gitpod.Dockerfile
tasks:
- name: TCP Tunnel
command: chisel server --socks5
- name: SSH Server
command: |
[ -f /workspace/dropbear.hostkey ] || dropbearkey -t rsa -f /workspace/dropbear.hostkey
dropbear -r /workspace/dropbear.hostkey -F -E -s -p 2222 -P ~/dropbear.pid
- command: |
mkdir -p ~/.ssh && open ~/.ssh/authorized_keys
clear
echo "=============="
echo " INSTRUCTIONS "
echo "=============="
echo ""
echo "1. Add your public SSH key to ~/.ssh/authorized_keys of this Gitpod workspace"
echo ""
echo "2. Install Chisel on your local machine, e.g. curl https://i.jpillora.com/chisel! | bash"
echo " see https://github.com/jpillora/chisel"
echo ""
echo "3. Connect via SSH from your local machine:"
echo " ssh -o ProxyCommand='chisel client $(gp url 8080) stdio:%h:%p' gitpod@localhost -p 2222"
echo ""
ports:
- port: 8080
- port: 2222
onOpen: ignore