bit-docker
bit-docker copied to clipboard
when i follow the Readme.md, something is wrong in harmony-docker
when i follow the Readme.md, something is wrong in harmony-docker
- run
docker build . -t harmony-scope
- run
docker run --rm --name my-scope -d -p 3000:3000 harmony-scope
only show this
68079f6304787636632a33fa593bd1a48389dfe38a5737ef5f6b7cdf5681f935
then i delete --rm
run docker run --name my-scope -d -p 3000:3000 harmony-scope
+ apt-get update
Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
Ign:2 http://deb.debian.org/debian stretch InRelease
Hit:3 http://deb.debian.org/debian stretch-updates InRelease
Hit:4 http://deb.debian.org/debian stretch Release
Reading package lists...
+ yarn global add $'@teambit/bit\303\237'
yarn global v1.22.5
[1/4] Resolving packages...
error An unexpected error occurred: "https://registry.yarnpkg.com/@teambit%2fbitß: Not found".
info If you think this is a bug, please open a bug report with the information provided in "/usr/local/share/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this command.
+ bit init --bare
successfully initialized an empty bare bit scope.
+ bit start
error: component "teambit.bit/scope" was not found
consider running "bit dependents teambit.bit/scope" to understand why this component was needed
Is there something wrong here?
# init.sh
#!/bin/bash
set -x
apt-get update
# wrong?
yarn global add @teambit/bitß
bit init --bare
bit start
https://github.com/teambit/bit-docker/pull/5
Just a coincidence, but most likely related.
I have the same issue. Any updates?
There's an extra character in the package name ß
. Remove it.
Even after removing the extra character, the bit server refuses to start.
[4/4] Building fresh packages...
success Installed "@teambit/[email protected]" with binaries:
- bbit
Done in 11.47s.
+ bit init --bare
successfully initialized an empty bare bit scope.
+ bit start
error: component "teambit.bit/scope" was not found
consider running "bit dependents teambit.bit/scope" to understand why this component was needed
Made some progress. In scope.jsonc
, there seems to be a typo: teambit.bit/scope
is wrong, should be teambit/scope
{
"teambit/scope": {
"description": "this is a simple demo scope for Harmony."
}
}
Thanks @olivierpilotte I've also been battling with bit docker for a while, unfortunately i don't think this project is fit for purpose.
Yeah I'm trying to run it on Kubernetes. It starts but after some time it crashes with no logs / cues on what's going on.
I managed to get it stable in docker (so should work for you in k8s) - i used your changes above and also commented out anything that needs an outbound internet connection in init.sh as we have a proxy and it appears bit doesnt support proxies. I'm using "bbit" instead of "bit" plus extra debug which as you said doesn't really show anything anyway
#!/bin/bash set -x bbit init --bare bbit start -v --log trace
These are the full logs for the container:
+ bbit init --bare
- running command init [path]...
successfully initialized an empty bare bit scope.
+ bbit start -v --log trace
- loading bit...
- loading aspects...
- running command start [type] [pattern]...
scope.jsonc has been changed. Rebuilding UI assets for 'scope in target directory: public/bit'
(node:28) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /usr/local/share/.config/yarn/global/node_modules/@teambit/ui/node_modules/postcss/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:28) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./public/" in the "exports" field module resolution of the package at /usr/local/share/.config/yarn/global/node_modules/extract-files/package.json.
Update this package.json to use a subpath pattern like "./public/*".
Bit server has started on port 3000
It crashes right after the last line. I'm not sure what's going on.
Here is the Dockerfile
I am using for rootless Auto-DevOps, if it helps at all:
https://gitlab.com/watheia/micro/-/blob/main/Dockerfile
note: the chrome install script isn't needed for the solution.
@olivierpilotte this might solve your issue: https://github.com/teambit/bit-docker/issues/7
@olivierpilotte this might solve your issue: #7
It doesn't. container still stops after some time.
[Partially Working] It's working on local machine and exiting on remote digital ocean server. On my local machine (Mac) it was exiting because of some Node.js Heap Memory Issue I allocated 6GB to Docker Desktop and now it's working fine on local but not working on remote machine.
So you should check why the container is exiting through docker logs using docker logs $containerName