Sign inSign up

dbwebb/courserepo

By dbwebb

•Updated over 1 year ago

Docker images for working with dbwebb course repos.

Image
0

9.4K

dbwebb/courserepo repository overview

⁠Docker for dbwebb course repo

Docker images for working with dbwebb course repos.

The organisation dbwebb resides in the dbwebb organisation on GitHub⁠.

⁠Complete course repos

The particular course repo installed in the docker image.

⁠Course repo

Use these with a course repo you have on local disk and mount the filesystem onto the container. It has development tools and is useful for testing cli or with a web server.

⁠CTF

These are course repos with additional CTF utilities for dbwebb capture the flag.

⁠Base images

With all, or parts of the development utilities, installed.

⁠Debian installation

Here are a set of base installations for Debian, the one tagged debian is the base for all images above.

⁠Quick reference

⁠How to use this image

⁠With course repo Makefile

The Makefile in the courserepo has support for running docker related commands. Execute make and see all commands starting with docker-.

⁠With docker-compose

Create a docker-compose.yml. The course repo should contain such a file.

version: "3"
services:
    databas: &databas
        image: dbwebb/courserepo:databas
        volumes:
            - ".:/home/dbwebb/repo"
            - "/home/dbwebb/repo/bin"
            - "/home/dbwebb/repo/build"
            - "/home/dbwebb/repo/node_modules"
            - "/home/dbwebb/repo/vendor"
            - "./example/sql/inspect/my.cnf:/home/dbwebb/.my.cnf"

    cli:
        <<: *databas
        #image: dbwebb/courserepo:cli
        # image: dbwebb/courserepo:databas
        # volumes:
        #     - ".:/home/dbwebb/repo"
        #     - "./example/sql/inspect/my.cnf:/home/dbwebb/.my.cnf"

    server:
        <<: *databas
        ports:
            - "1337:1337"

    # Complete course repos
    course-databas:
        image: dbwebb/courserepo:databas
        ports: [ "10042:80" ]
    course-oophp:
        image: dbwebb/courserepo:oophp
        ports: [ "10042:80" ]

    # Course repo
    cli:
        image: dbwebb/courserepo:cli
        volumes: [ ".:/home/dbwebb/repo" ]
    course:
        image: dbwebb/courserepo
        volumes: [ ".:/home/dbwebb/repo" ]
        ports: [ "10042:80" ]
    web:
        image: dbwebb/courserepo:web
        volumes: [ ".:/home/dbwebb/repo" ]
        ports: [ "10042:80" ]
    apache:
        image: dbwebb/courserepo:apache
        volumes: [ ".:/home/dbwebb/repo" ]
        ports: [ "10042:80" ]

    # CTF
    ctf:
        image: dbwebb/courserepo:ctf
        volumes: [ ".:/home/dbwebb/repo" ]
    ctf-cli:
        image: dbwebb/courserepo:ctf-cli
        volumes: [ ".:/home/dbwebb/repo" ]
    ctf-apache:
        image: dbwebb/courserepo:ctf-apache
        volumes: [ ".:/home/dbwebb/repo" ]

    # Base images
    base-all:
        image: dbwebb/courserepo:base-all
        volumes: [ ".:/home/dbwebb/repo" ]
        ports: [ "10042:80" ]
    base-apache:
        image: dbwebb/courserepo:base-apache
        volumes: [ ".:/home/dbwebb/repo" ]
        ports: [ "10042:80" ]
    base-php:
        image: dbwebb/courserepo:base-php
        volumes: [ ".:/home/dbwebb/repo" ]
    base-python:
        image: dbwebb/courserepo:base-python
        volumes: [ ".:/home/dbwebb/repo" ]
    base-node:
        image: dbwebb/courserepo:base-node
        volumes: [ ".:/home/dbwebb/repo" ]
    base:
        image: dbwebb/courserepo:base
        volumes: [ ".:/home/dbwebb/repo" ]

    # Debian installations
    jessie:
        image: dbwebb/courserepo:jessie
        volumes: [ ".:/home/dbwebb/repo" ]
    stretch:
        image: dbwebb/courserepo:stretch
        volumes: [ ".:/home/dbwebb/repo" ]
    buster:
        image: dbwebb/courserepo:buster
        volumes: [ ".:/home/dbwebb/repo" ]

Your current directory (the course repo) will be mounted onto the container, excluding those directories listed, which are part of the image itself.

Start the container in the background.

docker-compose up -d course

Open a browser to localhost:10042.

Run a bash terminal on the running container.

docker-compose exec course bash

Shut down the container.

docker-compose down

Run a one off command using another container.

docker-compose run course bash

⁠License

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

⁠Acknowledgement

This is a co-effort of several people using freely available documentation and tools from the open source community.

For contributors, see commit history and issues.

 .
..:  Copyright (c) 2017-2021 Mikael Roos, [email protected]

Tag summary

Content type

Image

Digest

sha256:a319efd44…

Size

316 MB

Last updated

over 1 year ago

docker pull dbwebb/courserepo