Giter Site home page Giter Site logo

Comments (5)

willis7 avatar willis7 commented on August 26, 2024 2

There's some good commentary in the Dockerfile itself. Here's one example:

# VERSION:        0.1
# DESCRIPTION:    Create the atom editor in a container 
# AUTHOR:         Jessica Frazelle <[email protected]>
# COMMENTS:
#   This file describes how to build the atom editor 
#   in a container with all dependencies installed.
#   Note: atom is not a node-webkit app,
#   found this out a little too late into this example
#   it uses atom-shell(https://github.com/atom/atom-shell)
#   Tested on Debian Jessie.
# USAGE:
#   # Download atom Dockerfile
#   wget http://raw.githubusercontent.com/jfrazelle/dockerfiles/master/atom/Dockerfile
#
#   # Build atom image
#   docker build -t atom .
#
#   docker run -v /tmp/.X11-unix:/tmp/.X11-unix \
#     -e DISPLAY=unix$DISPLAY atom
#

from dockerfiles.

juev avatar juev commented on August 26, 2024

+1

from dockerfiles.

jessfraz avatar jessfraz commented on August 26, 2024

ok i think almost all have instructions at the top now

from dockerfiles.

veerendra2 avatar veerendra2 commented on August 26, 2024

Not sure, how to start firefox container.

https://github.com/jessfraz/dockerfiles/blob/master/firefox/Dockerfile

veeru@ghost:~$ sudo docker run --rm r.j3ss.co/firefox:latest

(firefox:1): Gtk-WARNING **: 17:52:50.701: Locale not supported by C library.
	Using the fallback 'C' locale.
Error: no DISPLAY environment variable specified

Any help?

from dockerfiles.

jelinekb avatar jelinekb commented on August 26, 2024

This worked for me (see https://github.com/jessfraz/dotfiles/blob/master/.dockerfunc)

xhost + # caution: may not be secure

docker run -d
--tmpfs /dev/shm
--net host
--cpuset-cpus 0
-v /etc/localtime:/etc/localtime:ro
-v /tmp/.X11-unix:/tmp/.X11-unix
-v "${HOME}/.firefox/cache:/root/.cache/mozilla"
-v "${HOME}/.firefox/mozilla:/root/.mozilla"
-v "${HOME}/Downloads:/root/Downloads"
-v "${HOME}/Pictures:/root/Pictures"
-v "${HOME}/Torrents:/root/Torrents"
-e "DISPLAY=${DISPLAY}"
-e GDK_SCALE
-e GDK_DPI_SCALE
--device /dev/snd
--device /dev/dri
--name firefox
jess/firefox "$@"

NOTES:
Replaced "--memory 2gb" with "--tmpfs /dev/shm" to address tab crashes (see
https://github.com/jessfraz/dockerfiles/issues/490)

Replaced -e "DISPLAY=unix${DISPLAY}" \ with -e "DISPLAY=${DISPLAY}" \ to connect to local host on Ubuntu

Replaced ${DOCKER_REPO_PREFIX}/firefox "$@" with hardcoded jess/firefox "$@"

from dockerfiles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.