{"id":13547028,"url":"https://github.com/teambit/bit-docker","last_synced_at":"2025-06-13T04:32:31.409Z","repository":{"id":44443472,"uuid":"87431027","full_name":"teambit/bit-docker","owner":"teambit","description":"A dockerfile setup to run your own Bit server.","archived":false,"fork":false,"pushed_at":"2021-06-20T19:30:59.000Z","size":438,"stargazers_count":92,"open_issues_count":7,"forks_count":32,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-04T05:29:35.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.bit.dev","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/teambit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-06T13:12:33.000Z","updated_at":"2025-01-23T21:58:17.000Z","dependencies_parsed_at":"2022-07-13T01:50:39.007Z","dependency_job_id":null,"html_url":"https://github.com/teambit/bit-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/teambit/bit-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Fbit-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Fbit-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Fbit-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Fbit-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teambit","download_url":"https://codeload.github.com/teambit/bit-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teambit%2Fbit-docker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259580864,"owners_count":22879742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:00:49.757Z","updated_at":"2025-06-13T04:32:31.388Z","avatar_url":"https://github.com/teambit.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"readme":"# Bit-docker\n\n*This repo is only used for legacy (not harmony) scopes. for harmony please use https://github.com/teambit/bit/blob/master/scripts/docker-teambit-bit/README.md*\n\nA dockerfile setup to run your own [Bit](https://www.github.com/teambit/bit) server.  \nIf you want to setup a bare-bone Bit remote server without Docker, please refer to [this guide](https://docs.bit.dev/docs/bit-server).\n\n## Getting started\n\n1. Clone this repository.  \n1. Build image and run server.  \n    ```sh\n    $ docker build . -t bit\n    $ docker run --rm --name bit -d -P  --volume ~/.ssh/id_rsa.pub:/tmp/id_rsa.pub bitcli/bit-docker\n    $ docker port bit 22\n    ```\n1. Configure workspace to use the server.  \n    ```sh\n    $ bit remote add ssh://root@\u003chostname\u003e:22:/tmp/scope -g\n    ```\n1. Export components to a Bit server.  \n    ```sh\n    $ bit export scope\n    ```\n1. Import components from a Bit server.  \n    ```sh\n    $ bit import scope.\u003ccomponent-name\u003e\n    ````\n1. Stop server  \n    ```sh\n    $ docker kill bit\n    ```\n\n## Troubleshooting\n\n### Unable to connect to server\n\n- See if container is running.  \n    ```sh\n    $ docker ps --all | grep bit\n    ```\n- Make the SSH port is configured correctly.  \n    ```sh\n    $ docker port bit 22\n    ```\n- See that your server is configured for your workspace.  \n    ```sh\n    $ bit remote\n    ```\n    \n### Unable to import/export\n\nBit uses SSH for networking. This setup [mounts your user account SSH keys](https://github.com/teambit/bit-docker/blob/master/Dockerfile#L24).  \nTo manually set up authentication, or authenticate another key:\n\n1. Copy a public key to the container.  \n    ```sh\n    $ docker cp ~/.ssh/id_rsa bit:/root/.ssh/\n    ```\n1. Run bash on the container.  \n    ```sh\n    $ docker exec -it bit /bin/bash\n    ```\n1. Configure the container's SSH daemon with the new key (run from container's bash).  \n    ```sh\n    $ bit config ssh_key_file /root/.ssh/id_rsa\n    ```\n\n### Run bash on the container\n\nWhen you need to run any command on the Bit server, you first need to get bash on the container:\n\n```sh\n$ docker exec -it bit /bin/bash\n```\n\nNow each command you run, runs on the server.\n\n### Tail server logs\n\nTo run the `tail` command and get the server's logs, you should first [get bash on the container](#run-bash-on-the-container). Then `tail` Bit's log:\n\n```sh\n$ tail -f /root/Library/Caches/Bit/logs/debug.log\n```\n\n## For maintainers - Run server from a local build\n\nAfter building Bit from source code, run this command:\n\n```sh\n$ docker run --rm --name bit -d -P  --volume \u003cpath to git-clone of bit\u003e:/bit-bin  --volume ~/.ssh/id_rsa.pub:/tmp/id_rsa.pub --env 'DEVELOPMENT=true' bitcli/bit-docker\n```\n\n## Contributing\n\nContributions are always welcome, no matter how large or small.\n\n## License\n\nMIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteambit%2Fbit-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteambit%2Fbit-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteambit%2Fbit-docker/lists"}