Giter VIP home page Giter VIP logo

workshop's Introduction

workshop

This is a docker image that defines a development environment (vim, tmux, git, ssh, etc) which you can use in lieu of manually installing these things onto your machine. This means that if you get a new development machine you can theoretically just install Docker and immediately get back to work.

There are two main parts to our approach:

  • The "workshop" is the docker image that contains your tools (vim, git, etc) - that's what this repo is for (you can of course create your own from scratch or using FROM thedxw/workshop)
  • The "workbench" is where your code lives - in this project we assume that you have a directory called /workbench on the host machine

How to

What you will need installed:

Set up:

  1. Make sure Docker.app is running
  2. Create your workbench and chown appropriately (e.g. sudo mkdir /workbench && sudo chown tomdxw:staff /workbench)
  3. In Docker for Mac's preferences, add /workbench as a shared folder
  4. Clone the workshop image: cd /workbench && git clone https://github.com/dxw/workshop.git

Run it:

  1. /workbench/workshop/tools/run.sh thedxw/workshop (you can use another image instead of thedxw/workshop, such as thedxw/workshop-tomdxw)

If everything worked, you should now be sitting inside a zsh session inside tmux inside Ubuntu inside Docker inside a custom Linux distro inside xhyve inside macOS.

Configuring your workshop

To configure your workshop to how you like it, write a new Dockerfile based on the base workshop image:

FROM thedxw/workshop

# Switch WORKDIR/USER temporarily
WORKDIR /
USER root

# do things here

# Switch WORKDIR/USER back
WORKDIR /workbench/src
USER core

Here's an example: https://github.com/dxw/workshop-tomdxw

Help - how do I load in my SSH keys?

There are a few approaches:

  1. (Recommended) Write a new Dockerfile and add symlinks to a location within /workbench: RUN ln -s /workbench/home/.ssh/id_rsa /home/core/.ssh/id_rsa && ln -s /workbench/home/.ssh/id_rsa.pub /home/core/.ssh/id_rsa.pub
  2. You can just mount your .ssh dir into ~: i.e. add -v /Users/me/.ssh/:/home/core/.ssh/ to the docker run command
  3. You could also use the COPY directive in a Dockerfile to put them in

Having to press Ctrl-P twice is annoying

Set the detachKeys option in .docker/config.json:

{
  "detachKeys": "ctrl-q,ctrl-u,ctrl-i,ctrl-t"
}

workshop's People

Contributors

mallorydxw avatar

Watchers

James Cloos avatar  avatar  avatar

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.