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

Add docker stuff. #23

Open
wants to merge 1 commit 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
15 changes: 15 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM alpine:3.11 AS build

COPY . /opt/irtt

RUN apk --update add go git
RUN go get ./opt/irtt
RUN cd /opt/irtt && go install -v ./cmd/irtt


FROM alpine:3.11

COPY --from=build /root/go/bin/irtt /opt

ENTRYPOINT ["/opt/irtt"]
CMD []
17 changes: 17 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Docker

It is possible to run IRTT using [Docker](https://docs.docker.com/install/).


## Client

The [irtt](irtt) wrapper script is provided to run IRTT using Docker with some
sane defaults. To use privileged options (i.e. using low ports) you might need
the adjust the script to run as `root`.


## Server

The IRTT server can be run using [Docker
Compose](https://docs.docker.com/compose/). The `docker-compose.yml` file can be
used as a starting point to run a public IRTT server.
8 changes: 8 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '3'
services:
irtt:
image: liske/irtt
network_mode: host
read_only: true
user: nobody
command: server
6 changes: 6 additions & 0 deletions docker/irtt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

USER=nobody
IMAGE=liske/irtt

exec docker run --rm -it --network=host --read-only "--user=$USER" "$IMAGE" $@