Skip to content

Commit

Permalink
fix issue 1, not running on old linux distros
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonenzo committed Jan 17, 2020
1 parent 0e7b42b commit d33501c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 15 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
## Author: Nelson E Hernandez
## Date:
FROM debian:latest
FROM centos:centos6.9
## install build tools
RUN apt-get update && apt-get install -y autotools-dev automake git build-essential wget fuse file
RUN /usr/bin/yum groupinstall -y "Development Tools"
RUN /usr/bin/yum install -y wget

RUN wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && \
chmod +x linuxdeploy-x86_64.AppImage && mv linuxdeploy-x86_64.AppImage /usr/bin/linuxdeploy
RUN wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage \
&& chmod +x linuxdeploy-x86_64.AppImage \
&& ./linuxdeploy-x86_64.AppImage --appimage-extract \
&& ln -nfs /squashfs-root/usr/bin/linuxdeploy /usr/bin/linuxdeploy

## install tmux specific packages
RUN apt-get install -y libevent-dev libncurses5-dev libncursesw5-dev bison byacc pkg-config
RUN yum install -y libevent2-devel.x86_64 ncurses-devel

## Change RELEASE_TAG to desired version/git sha
ENV RELEASE_TAG=3.0a
Expand Down
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
### What is this?
Dockerfile to create an AppImage of tmux.

### Why use docker?
### Why use Docker?
The advantages to doing it this way are:
- Obtain consistent build results on any computer.
- No need to install a slew of build packages on your own machine.
Expand All @@ -14,22 +14,35 @@ The advantages to doing it this way are:
## clone me
git clone https://github.com/nelsonenzo/tmux-appimage.git
## compile tmux
## compile tmux from source by building container
docker build . -t tmux
## make appimage
docker run -it --cap-add SYS_ADMIN --cap-add MKNOD --device /dev/fuse:mrw -v "$PWD"/opt:/opt tmux
## make appimage by running container
docker run -it -v "$PWD"/opt:/opt tmux
## move appimage to executable location in your $PATH
## expected output:
./opt/releases/tmux-3.0a-x86_64.AppImage
```


## To use AppImage
move appimage to executable location in your $PATH
```
mv ./opt/releases/tmux.*AppImage /usr/bin/tmux
tmux
```

### Will it only run on Debian?
I suspect the tmux binary is very portable and this build will work on multiple Linux variants, but I have only tested it on Debian based distros so far. When I have tested on other distros I will remove this message.
### Where has the AppImage been tested to turn?
It has been tested on these fine Linux platforms and will likely work for anything newer than centos 6.9 (which is a few years old now.) Please file an issue if you find otherwise or need support on a different platform.
```
ubuntu 18
centos 6.9
centos 7.6
fedora 31
```

### What is the sauce that makes this work?
The [Dockerfile](Dockerfile) contains all the magic ingredients to compile tmux.

[opt/build.sh](opt/build.sh) creates the AppImage.
[./opt/build.sh](opt/build.sh) creates the AppImage from binary using linuxdeploy tool.
9 changes: 7 additions & 2 deletions opt/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/bash
mkdir /opt/releases

cd /tmux

export OUTPUT="/opt/releases/tmux-debian-$RELEASE_TAG-x86_64.AppImage"
/usr/bin/linuxdeploy --appdir=AppDir -i /opt/tmux-logo-square.png -d /opt/tmux.desktop -e MakeBuild/bin/tmux --output=appimage
export OUTPUT="/opt/releases/tmux-$RELEASE_TAG-x86_64.AppImage"

/usr/bin/linuxdeploy --appdir=AppDir \
-i /opt/tmux-logo-square.png \
-d /opt/tmux.desktop \
-e MakeBuild/bin/tmux --output=appimage

0 comments on commit d33501c

Please sign in to comment.