Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Add Dockerfile and instructions #66

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM docker.io/library/node:9.2

ADD . /pegaswitch
WORKDIR /pegaswitch

RUN npm install
RUN npm install pty.js

EXPOSE 53 53/udp 80 8100

CMD node start.js --ip $IP_ADDR
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@ Usage

It should no longer be necessary to run `usefulscripts/SetupNew.js`, since PegaSwitch will now do it automatically.

## Through Docker
### Building
The container image is based on the official `nodejs:9.2` image.
To build the docker container image simply run:

`docker build -t reswitched/pegaswitch .`


### Running
To run the docker container container first you have to figure out your
local network IP address.

1. Run `ip a`
2. Run `docker run -ti -p 53:53/udp -p 53:53 -p 80:80 -p 8100:8100 --env TERM --env IP_ADDR={your IP address from the prior command} reswitched/pegaswitch`

If you fail to set the `IP_ADDR` variable the container will not start.

Documentation
=============

Expand Down