Skip to content

Instantly share code, notes, and snippets.

@bepvte
Created March 30, 2020 20:37
Show Gist options
  • Save bepvte/a58d34a2d2781b98cc47c3045dc8def1 to your computer and use it in GitHub Desktop.
Save bepvte/a58d34a2d2781b98cc47c3045dc8def1 to your computer and use it in GitHub Desktop.
some dockerfiles for firefox docker
FROM buildpack-deps:18.04
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libegl1-mesa \
mesa-va-drivers \
mesa-vdpau-drivers \
mesa-vulkan-drivers \
firefox
#!/usr/bin/bash
set -exupo pipefail
IFS=$'\n\t'
if [ "$UID" != "0" ]; then
echo -e "\e[31mYou are not root.\e[0m"
exit 1
fi
export BUILDAH_HISTORY=true
buildah rm firefox || true
container="\
$(buildah from \
--net=ubr0 \
--dns=10.13.37.1 \
--name firefox \
--pull=false \
buildpack-deps:18.04)"
readonly container
buildah run "$container" -- bash -c "\
apt-get update && apt-get install -y \
libgl1-mesa-glx \
libegl1-mesa \
mesa-va-drivers \
mesa-vdpau-drivers \
mesa-vulkan-drivers \
firefox"
buildah config --cmd firefox "$container"
buildah commit --rm "$container" firefox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment