Skip to content

Instantly share code, notes, and snippets.

@apiraino
Created January 27, 2020 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apiraino/262dc499ceeed7003bf83b6ecd9c9591 to your computer and use it in GitHub Desktop.
Save apiraino/262dc499ceeed7003bf83b6ecd9c9591 to your computer and use it in GitHub Desktop.
Dockerfile test to build all Sway things
FROM ubuntu:19.10
MAINTAINER apiraino "github.com/apiraino"
# DONT USE THIS, IT DOESNT (yet) WORK
# Instructions
# docker build -t "swaywm:builder" .
# docker run --rm -v /tmp/sway-compiled:/export -it "swaywm:builder" bash
# then inside the container run "cp -r sway-src/* /export"
# You'll find the build outside the container in "/tmp/sway-compiled"
RUN apt update && \
apt -y upgrade
# generic packages for compiling
RUN apt install -y build-essential cmake meson libwayland-dev wayland-protocols \
libegl1-mesa-dev libgles2-mesa-dev libdrm-dev libgbm-dev libinput-dev \
libxkbcommon-dev libudev-dev libpixman-1-dev libsystemd-dev libcap-dev \
libxcb1-dev libxcb-composite0-dev libxcb-xfixes0-dev libxcb-xinput-dev \
libxcb-image0-dev libxcb-render-util0-dev libx11-xcb-dev libxcb-icccm4-dev \
freerdp2-dev libwinpr2-dev libpng-dev libavutil-dev libavcodec-dev \
libavformat-dev universal-ctags git
# specific devel packages for Sway
RUN apt install -y libjson-c-dev scdoc libpcre3-dev libcairo2-dev libpango1.0-dev \
libgdk-pixbuf2.0-dev xwayland
# cleanup
RUN apt clean && \
rm -rf /var/lib/apt/lists/*
WORKDIR /sway
RUN mkdir sway-src
# Compile wlroots
RUN cd sway-src && git clone https://github.com/swaywm/wlroots.git && \
cd wlroots && \
git checkout 0.10.0 && \
meson build && \
ninja -C build install
# Install sway
RUN cd sway-src && git clone https://github.com/swaywm/sway.git && \
cd sway && \
git checkout 1.4 && \
meson build && \
ninja -C build install
# Install swaybg
RUN cd sway-src && git clone https://github.com/swaywm/swaybg.git && \
cd swaybg && \
git checkout 1.0 && \
meson build && \
ninja -C build install
RUN mkdir /export
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment