windows7 docker-compose の npm installでエラー
イシュー
内容
root@e3f7d6a3b4b2:/var/www/projects/relief-form# npm install angular-cli --save npm WARN deprecated angular-cli@1.0.0-beta.28.3: angular-cli has been renamed to @angular/cli. Please update your dependencies. npm WARN deprecated gulp-util@3.0.7: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN enoent ENOENT: no such file or directory, open '/var/www/projects/relief-form/package.json' npm WARN @angular/core@2.4.10 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself. npm WARN relief-form No description npm WARN relief-form No repository field. npm WARN relief-form No README data npm WARN relief-form No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: mkdirp@0.5.1 (node_modules/@angular-cli/ast-tools/node_modules/mkdirp): npm WARN rofs SKIPPING OPTIONAL DEPENDENCY: EROFS: read-only file system, symlink '../mkdirp/bin/cmd.js' -> '/var/www/projects/relief-form/node_modules/@angular-cli/ast-tools/node_modules/.bin/mkdirp' npm ERR! path ../typescript/bin/tsc npm ERR! code EROFS npm ERR! errno -30 npm ERR! syscall symlink npm ERR! rofs EROFS: read-only file system, symlink '../typescript/bin/tsc' -> '/var/www/projects/relief-form/node_modules/@angular-cli/ast-tools/node_modules/.bin/tsc' npm ERR! rofs Often virtualized file systems, or other file systems npm ERR! rofs that don't support symlinks, give this error. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-02-02T10_22_18_409Z-debug.log root@e3f7d6a3b4b2:/var/www/projects/relief-form# ls
- WindowsホストでVirtualBoxでLaravel-Mix 、やっとできた - 墨と鉛筆
- mount bind という救世主
mount bind
- 誰かが何かで得する mount の --bind オプションでディレクトリをマウントするメモ - ようへいの日々精進XP
- mountのbindオプションでディレクトリをマウントする - 理想未来はどうなった?
- 3.11. Bind マウントとコンテキスト依存のパス名 - Red Hat Customer Portal
- OSSはアルミニウムの翼で飛ぶ: bind mount って使ってる?
- 強力なシンボリックリンクとして活用できるmountのbindオプションについて -- ぺけみさお
- 誰かが何かで得する mount の --bind オプションでディレクトリをマウントするメモ - ようへいの日々精進XP
virtualbox x シンボリックリンク
- Windows 7環境でのVirtualBox(vagrant)の共有フォルダーのトラブル2つ - Qiita
- VirtualBox の Shared Folders でシンボリックリンクを作れるようにする | 穀風
- Linux - Virtualbox共有ディレクトリに対して、シンボリックリンクを作りたい(100520)|teratail
- Dockerにホストのフォルダをマウントしたい! - Qiita
手動マウント
VagrantとDockerを使用した開発環境構築 - Developer’s Blog
- --no-bin-links を使うという案
Angular CLIをアップデートしたメモ〜angular-cliから@angular/cliへ - Goalist Developers Blog
3.11. Bind マウントとコンテキスト依存のパス名 - Red Hat Customer Portal
- redhat 公式
npm install でKilledされた
- メモリが少ないらしい
参考
- `npm install` が殺される on 低容量メモリ環境 - Qiita
- Docker machine のメモリを増やす方法 - Qiita
- この手順で2Gに増やしたら成功した。
angular プロジェクトで、npm install したら、not found: python
gyp verb `which` failed Error: not found: python
ng build 時にエラー
TypeError: Cannot destructure property `bold` of 'undefined' or 'null'.
参考
バージョンを確認する
(動いている)開発環境のバージョン
$ ng --version @angular/cli: 1.4.9 node: 6.9.5 $ python --version Python 2.7.12
(エラーになった)Docker環境のバージョン
$ ng --version Angular CLI: 1.6.7 Node: 9.5.0 OS: linux x64 $ python -V Python 2.7.12
typescriptなしで入れなおした
$ ng --version Angular CLI: 1.6.7 Node: 8.9.4 OS: linux x64 Angular: error ... cli, common, compiler, compiler-cli, core, forms, http ... platform-browser, platform-browser-dynamic, router typescript: error webpack: error $
Python でも落ちる
ERROR: Service 'workspace' failed to build: The command '/bin/sh -c if [ ${INSTALL_PYTHON} = true ]; then apt-get update && apt-get -y install python python-pip python-dev build-essential && pip install --upgrade pip && pip install --upgrade virtualenv ;fi' returned a non-zero code: 100
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python-defaults/ python-minimal_2.7.11-1_amd64.deb Bad header line Bad header data [IP: 91.189.8 8.149 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python2.7/libpyt hon2.7-stdlib_2.7.12-1ubuntu0~16.04.3_amd64.deb Bad header line Bad header data [IP: 91.189.88.162 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python-defaults/ libpython-stdlib_2.7.11-1_amd64.deb Bad header line Bad header data [IP: 91.189 .88.152 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-mis sing? ERROR: Service 'workspace' failed to build: The command '/bin/sh -c if [ ${INSTA LL_PYTHON} = true ]; then apt-get update && apt-get -y install python python -pip python-dev build-essential && pip install --upgrade pip && pip instal l --upgrade virtualenv ;fi' returned a non-zero code: 100
参考
古いイメージを削除する
docker images | awk 'NR>1 {print $3}' | xargs docker rmi
イメージを取得しなおす
bad header エラー
Err:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 python-minimal amd64 2.7.11-1
参考
- apt get - apt-get update Bad header line - Stack Overflow
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? - Ask Ubuntu
- apt-get clean してみた。
- インストールできた。
- apt-get clean してみた。
-
- 混雑しているらしい
- Ubuntuのaptで使うパッケージリポジトリを変更する - 偏った言語信者の垂れ流し
- [Ubuntu] 1行コマンドで高速リポジトリに変更する – pc.casey.jp
/etc/apt/souces.list を編集する
-
- sed で書き換えるサンプル
Dockerのデーモン設定ファイルでコンテナのデフォルト/etc/resolv.conf設定 - tsunokawaのはてなダイアリー
- Dockerのオプションで resolv.conf を書き換えられる
Cannot run docker from windows. · Issue #636 · docker/toolbox · GitHub
- コンテナの DNS を設定 — Docker-docs-ja 17.06.Beta ドキュメント
docker-compose で dns が設定できる(情報古い)
- Docker Compose - docker-compose.yml リファレンス - Qiita
- Compose file version 2 reference | Docker Documentation
- Docker Cloud stack file YAML reference | Docker Documentation
- docker の公式
apt /sources.list
docker-daemon
- DockerでDNSにアクセスできない時の対処法 - cpw's diary
- Docker の設定と実行 — Docker-docs-ja 1.9.0b ドキュメント
- daemon — Docker-docs-ja 17.06.Beta ドキュメント
- Need way to specify host DNS · Issue #2234 · docker/machine · GitHub
/var/lib/boot2docker/profile
ERROR: Service 'workspace' failed to build: The command '/bin/sh -c if [ ${INSTA LL_PYTHON} = true ]; then apt-get -yqq update && apt-get -y install python2. 7 python-pip python-dev build-essential && pip install --upgrade pip && pi p install --upgrade virtualenv ;fi' returned a non-zero code: 100
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python2.7/libpyt hon2.7-stdlib_2.7.12-1ubuntu0~16.04.3_amd64.deb Bad header line Bad header data [IP: 91.189.88.152 80] E: Unable to fetch some archives, maybe run apt-get update or try with --fix-mis sing?
docker-machine い
sudo vi /etc/resolv.conf
で、nameserver 8.8.8.8 を追加したら、インストールできた。
- apt-get updateでタイムアウトしてくれるときの設定 - Qiita
- apt の並列処理を操作する
- Ubuntu の apt がプロキシサーバを使うように設定
- 11.04 - Can the update manager download only a single package at a time? - Ask Ubuntu
apt-get -o Acquire::Queue-mode=access -o Acquire::http::Dl-Limit=70 -y install python2.7 python-pip python-dev build-essential