Created
March 30, 2020 20:37
-
-
Save bepvte/a58d34a2d2781b98cc47c3045dc8def1 to your computer and use it in GitHub Desktop.
some dockerfiles for firefox docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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