HarshVaragiya / SHELLCTF0x02

SHELLCTF 0x02 Archive

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SHELLCTF 0x02 Archive

Build Base Docker image

  • Assuming all challenges require ubuntu 18.04 LTS docker images
  • Example Dockerfile Dockerfile_Example
  • Build a base docker image which has ubuntu:18.04 updated and su installed (execute from git root)
docker build -t baseimage .
  • This will add a docker image "baseimage" in your docker images.. (check with 'docker image ls')

Challenge Workflow

  • Create a Dockerfile for the challenge/ set of challenges.
  • Add the challenges in the docker image.
  • Run 1 Docker container for that image exposing and mapping the necessary ports.

Creating Challenge Dockerfile

  • Build Docker Image for the set of challenges using the example dockerfile
FROM baseimage

WORKDIR <work_directory_for_challenge1>
COPY <challenge1_files/folder> <image_file/folder>
EXPOSE <port>
..

WORKDIR <work_directory_for_challenge2>
COPY <challenge2_files/folder> <image_file/folder> 
EXPOSE <port>
..


COPY startup_script.sh <script.sh>
CMD["<script.sh>"]
  • Make Sure to Write a startup_script.sh that would start the challenges and specify that as CMD/ENTRYPOINT

About

SHELLCTF 0x02 Archive


Languages

Language:Batchfile 61.4%Language:Shell 10.9%Language:PHP 9.2%Language:Python 3.9%Language:Dockerfile 3.7%Language:Hack 3.5%Language:C 2.7%Language:Perl 2.0%Language:TSQL 1.6%Language:Java 0.6%Language:C++ 0.4%Language:Makefile 0.1%