Giter Club home page Giter Club logo

docker-remotedev's Introduction

Docker Remote Development Environment

This Docker image is a full Debian Linux environment running GoTTY, which allows you to access a TTY inside the container from your web browser.

Usage

docker run -p 8080:8080 richardcarls/remotedev

A GoTTY instance is available on port 8080 running /bin/login by default. Check the container log for the generated root password to login, or supply one with -e ROOT_PASSWORD.

Run as user

docker run -e LOGIN_UID=`id myuser -u` -p 8080:8080 richardcarls/remotedev

By specifying LOGIN_UID, the init script creates a user in the container for login. The sudo command is available inside the container and the user is automatically added to the sudo group. The default user name dev can be overriden with -e LOGIN_NAME. Check the log for the generated login password, or specify one with -e LOGIN_PASSWORD.

Mounting home directory

docker run -v /some/host/directory:/userdata -p 8080:8080 richardcarls/remotedev

/userdata is symlinked to the container user's $HOME (or /root if running as root). If LOGIN_UID is not specified, the uid of the mounted host directory is used to create the login user. The init script does not modify permissions on this folder so it should be safe to mount your local home directory.

Configure GoTTY

By default, gotty runs /bin/login and reads default options from a provided .gotty configuration file in /userdata. The default config allows browser client write (--permit-write) and reconnect (--reconnect, --reconnect-timeout=10). You may override these and supply other gotty options via docker command, environment variables, or a custom .gotty config in your mounted /userdata directory.

Included packages

The below packages are included on top of the base debian image:

  • acl
  • bash-completion
  • curl
  • git
  • gpg
  • pwgen
  • nano
  • sudo
  • tmux
  • wget

Install additional packages on container start

You can specify additional packages to install at container start by setting -e INSTALL_PACKAGES.

docker run -v /some/host/directory:/userdata -e INSTALL_PACKAGES="emacs-nox nodejs" -p 8080:8080 richardcarls/remotedev

Run a startup script on ontainer start

Provide the path to a startup script to run with -e STARTUP_EXEC (relative to $HOME).

docker run -v /some/host/directory:/userdata -e STARTUP_EXEC="your-startup-script.sh" -p 8080:8080 richardcarls/remotedev

Change History

2.2.3

  • Remove openssh, add curl to image

2.2.2

  • Fixed entrypoint point line-endings

2.2.1

  • Swtich to using debian:latest

2.2.0

  • Bump gotty to latest version 1.0.1
  • Expose a second port (useful to run a dev server)

2.1.0

  • Added startup script hok

2.0.0

  • Added package install hook
  • Some default packages

1.0.0

Initial release

docker-remotedev's People

Contributors

richardcarls avatar

Watchers

 avatar

Forkers

findiscord

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.