Skip to content

Commit 5619e62

Browse files
authored
feat: added a container with gotty and some passphrase at /passphr… (#1)
* feat: added a container with gotty and some passphrase at /passphrase.txt
1 parent be67e7e commit 5619e62

File tree

7 files changed

+26
-14
lines changed

7 files changed

+26
-14
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# challenge-template
2-
A Pathwar Challenge template to get quickly started
1+
# challenge-debug
2+
A Pathwar Challenge for debugging purpose
3+
4+
# usage
5+
For local testing type: ```pathwar compose up --force-recreate <(pathwar compose prepare --no-push ./)```
36

47
Quick Start: https://github.com/pathwar/pathwar/wiki/Challenge-Maintainers

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3.7'
22

33
services:
4-
front:
5-
build: front
4+
gotty:
5+
build: gotty
66
ports:
7-
- 80
7+
- 8080

front/Dockerfile

Lines changed: 0 additions & 3 deletions
This file was deleted.

front/on-init

Lines changed: 0 additions & 3 deletions
This file was deleted.

front/static/index.html

Lines changed: 0 additions & 3 deletions
This file was deleted.

gotty/Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM golang:alpine
2+
3+
EXPOSE 8080
4+
5+
RUN apk add --update go git bash && \
6+
mkdir -p /tmp/gotty && \
7+
GOPATH=/tmp/gotty go get github.com/yudai/gotty && \
8+
mv /tmp/gotty/bin/gotty /usr/local/bin/ && \
9+
apk del go git && \
10+
rm -rf /tmp/gotty /var/cache/apk/*
11+
12+
COPY on-init /pwinit/
13+
14+
ENTRYPOINT ["/usr/local/bin/gotty"]
15+
CMD ["--permit-write","--reconnect","/bin/bash"]

gotty/on-init

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh -e
2+
3+
pwinit passphrase 0 > /passphrase.txt

0 commit comments

Comments
 (0)