Skip to content

Commit

Permalink
Fix docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Heckel committed Oct 3, 2021
1 parent 68de1da commit e161af3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM docker
MAINTAINER Philipp C. Heckel <philipp.heckel@gmail.com>
RUN \
apk add tmux \
apk add tmux asciinema \
&& mkdir -p /etc/replbot
COPY replbot /usr/bin

Expand Down
24 changes: 19 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,14 @@ sudo apt install replbot asciinema
**Debian/Ubuntu** (*manual install*)**:**
```bash
sudo apt install tmux
wget https://github.com/binwiederhier/replbot/releases/download/v0.6.2/replbot_0.6.2_amd64.deb
dpkg -i replbot_0.6.2_amd64.deb
wget https://github.com/binwiederhier/replbot/releases/download/v0.6.3/replbot_0.6.3_amd64.deb
dpkg -i replbot_0.6.3_amd64.deb
```

**Fedora/RHEL/CentOS:**
```bash
# Make sure that "tmux" is installed
rpm -ivh https://github.com/binwiederhier/replbot/releases/download/v0.6.2/replbot_0.6.2_amd64.rpm
rpm -ivh https://github.com/binwiederhier/replbot/releases/download/v0.6.3/replbot_0.6.3_amd64.rpm
```

**Docker:**
Expand All @@ -226,12 +226,26 @@ you'll need to give the REPLbot image access to the Docker socket file. This all
on the host. This is a security risk and considered bad practice, but it's the only way.

```bash
# Config and scripts live on the host
wget https://github.com/binwiederhier/replbot/archive/refs/tags/v0.6.3.tar.gz
tar zxvf v0.6.3.tar.gz
sudo mkdir /etc/replbot
sudo cp -a replbot-0.6.3/config/{script.d,config.yml} /etc/replbot
vi /etc/replbot/config.yml
# Configure at least "bot-token"

# Then you can start the REPLbot docker image
docker run --rm -it \
-v /etc/replbot:/etc/replbot \
-v ~/.asciinema:/root/.config/asciinema \
-v /var/run/docker.sock:/var/run/docker.sock \
binwiederhier/replbot
```

Please note that if you'd like to associate the asciinema videos to an account, you need to set up and map the config directory
properly. For me, that worked by installing it on the host, running `asciinema rec` once and then associating the install-id
located in `~/.asciinema/install-id`. Inside the docker image, asciinema expects the config directory to be in `~/.config/asciinema`.

**Go:**
```bash
# Be sure "tmux" is installed
Expand All @@ -241,8 +255,8 @@ go get -u heckel.io/replbot
**Manual install** (*any x86_64-based Linux*)**:**
```bash
# Make sure that "tmux" is installed
wget https://github.com/binwiederhier/replbot/releases/download/v0.6.2/replbot_0.6.2_linux_x86_64.tar.gz
sudo tar -C /usr/bin -zxf replbot_0.6.2_linux_x86_64.tar.gz replbot
wget https://github.com/binwiederhier/replbot/releases/download/v0.6.3/replbot_0.6.3_linux_x86_64.tar.gz
sudo tar -C /usr/bin -zxf replbot_0.6.3_linux_x86_64.tar.gz replbot
```

## Building
Expand Down
2 changes: 1 addition & 1 deletion util/tmux.sh.gotmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- /*gotype:heckel.io/replbot/util.tmuxScriptParams*/ -}}
#!/bin/bash
#!/bin/sh

set -e

Expand Down

0 comments on commit e161af3

Please sign in to comment.