Skip to content

Butterfly

Butterfly is a web terminal application that allows you to use your web browser as a console to the system that it is installed on. The butterfly docker container is a slightly more secure way of implementing it because it isolates the user to the docker container unless they have access to other machines within the network.

Container Information

Right now this container is built using alpine since it is a very slim container and this application has quite a few requirements.

FROM: alpine:latest

Build

1
docker build --force-rm -t butterfly:dev

Run

To run this container you simply need to run the following command.

Environment Variables

All of the values below are the defaults unless you specify something different while running the docker container. (-e VARIABLE="VALUE")

Environment Variable Defaults

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Port to listen on inside the docker container
_APP_PORT=3000
# Specify host to bind to or leave
_APP_HOST=0.0.0.0
# Set this to True in order to put butterfly in a debug mode
_APP_DEBUG=False
# Set this to True if you want to see more verbose output
_APP_VERBOSE=False
# Set this to False if you want to automatically login when accessing the site
_APP_LOGIN=True
# If you set this to False you will need to generate certs in order to access the terminal
_APP_UNSECURE=True
# Change which user the daemon will run as
_APP_USER=butterfly

Minimal run snippet

Minimal run script

1
2
3
4
docker run -itd \
    --name "butterfly" \
    -p 80:3000 \
    registry.kernelfortress.org/docker/butterfly:latest

Run snippet including environment variables

Full run snippet inccluding environment variable defaults

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
docker run -itd \
    --name "butterfly" \
    --hostname butterfly \
    -p 80:3000 \
    -e _APP_PORT="3000" \
    -e _APP_HOST="0.0.0.0" \
    -e _APP_DEBUG=False \
    -e _APP_VERBOSE=False \
    -e _APP_LOGIN=True \
    -e _APP_UNSECURE=True \
    -e _APP_USER=butterfly \
    -v $HOME:/user-data \
    -v /mnt/data:/mnt/data \
    registry.kernelfortress.org/docker/butterfly:latest