Git Product home page Git Product logo

bit-docker's Introduction

Bit-docker

A dockerfile setup to run your own Bit server.
If you want to setup a bare-bone Bit remote server without Docker, please refer to this guide.

Getting started

  1. Clone this repository.
  2. Build image and run server.
    $ docker build . -t bit
    $ docker run --rm --name bit -d -P  --volume ~/.ssh/id_rsa.pub:/tmp/id_rsa.pub bitcli/bit-docker
    $ docker port bit 22
  3. Configure workspace to use the server.
    $ bit remote add ssh://root@<hostname>:22:/tmp/scope -g
  4. Export components to a Bit server.
    $ bit export scope
  5. Import components from a Bit server.
    $ bit import scope.<component-name>
  6. Stop server
    $ docker kill bit

Troubleshooting

Unable to connect to server

  • See if container is running.
    $ docker ps --all | grep bit
  • Make the SSH port is configured correctly.
    $ docker port bit 22
  • See that your server is configured for your workspace.
    $ bit remote

Unable to import/export

Bit uses SSH for networking. This setup mounts your user account SSH keys.
To manually set up authentication, or authenticate another key:

  1. Copy a public key to the container.
    $ docker cp ~/.ssh/id_rsa bit:/root/.ssh/
  2. Run bash on the container.
    $ docker exec -it bit /bin/bash
  3. Configure the container's SSH daemon with the new key (run from container's bash).
    $ bit config ssh_key_file /root/.ssh/id_rsa

Run bash on the container

When you need to run any command on the Bit server, you first need to get bash on the container:

$ docker exec -it bit /bin/bash

Now each command you run, runs on the server.

Tail server logs

To run the tail command and get the server's logs, you should first get bash on the container. Then tail Bit's log:

$ tail -f /root/Library/Caches/Bit/logs/debug.log

For maintainers - Run server from a local build

After building Bit from source code, run this command:

$ docker run --rm --name bit -d -P  --volume <path to git-clone of bit>:/bit-bin  --volume ~/.ssh/id_rsa.pub:/tmp/id_rsa.pub --env 'DEVELOPMENT=true' bitcli/bit-docker

Contributing

Contributions are always welcome, no matter how large or small.

License

MIT License.

bit-docker's People

Contributors

itaymendel avatar amitgilad3 avatar giladshoham avatar ranyitz 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.