Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added a container with gotty and some passphrase at /passphrase… #1

Merged
merged 8 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# challenge-template
A Pathwar Challenge template to get quickly started
# challenge-debug
A Pathwar Challenge for debugging purpose

# usage
For local testing type: ```pathwar compose up --force-recreate <(pathwar compose prepare --no-push ./)```

Quick Start: https://github.com/pathwar/pathwar/wiki/Challenge-Maintainers
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.7'

services:
front:
build: front
gotty:
build: gotty
ports:
- 80
- 8080
3 changes: 0 additions & 3 deletions front/Dockerfile

This file was deleted.

3 changes: 0 additions & 3 deletions front/on-init

This file was deleted.

3 changes: 0 additions & 3 deletions front/static/index.html

This file was deleted.

16 changes: 16 additions & 0 deletions gotty/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM golang:alpine

EXPOSE 8080

RUN apk add --update go git && \
apk add bash && \
Z-a-r-a-k-i marked this conversation as resolved.
Show resolved Hide resolved
mkdir -p /tmp/gotty && \
GOPATH=/tmp/gotty go get github.com/yudai/gotty && \
mv /tmp/gotty/bin/gotty /usr/local/bin/ && \
apk del go git && \
rm -rf /tmp/gotty /var/cache/apk/*

COPY on-init /pwinit/

ENTRYPOINT ["/usr/local/bin/gotty"]
CMD ["--permit-write","--reconnect","/bin/bash"]
3 changes: 3 additions & 0 deletions gotty/on-init
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh -e

pwinit passphrase 0 > /passphrase.txt