butlerx / wetty

Terminal in browser over http/https. (Ajaxterm/Anyterm alternative, but much better)
https://butlerx.github.io/wetty
MIT License
4.37k stars 673 forks source link

docker build from the latest version doesn't run #27

Closed lfrancois closed 9 years ago

lfrancois commented 9 years ago

If I try the dockerhub available version, it runs fine, but it seems something is broken with the npm install. I have the same issue if I try to do install it out of docker, first I thought it was my environment, so it's why I decided to test it with the existing Dockerfile.

root@obelix:~/ludo-tests/wetty# git branch
* master
root@obelix:~/ludo-tests/wetty# git rev-parse HEAD
6663504f0df27322940f56fc3f8590990bc3d409
root@obelix:~/ludo-tests/wetty# docker run -p 3000:3000 7c4cfb5d4171

module.js:340
    throw err;
          ^
Error: Cannot find module '../build/Release/pty.node'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/app/node_modules/pty.js/lib/pty.js:9:11)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
root@obelix:~/ludo-tests/wetty# 
krishnasrinivas commented 9 years ago

Do you have node-gyp installed? Can you paste me output of npm install?

lfrancois commented 9 years ago

OK I don't know what happened last time. It works now :) My full log below!

root@staging01 ~ # git clone https://github.com/krishnasrinivas/wetty.git
Cloning into 'wetty'...
remote: Counting objects: 179, done.
Receiving objects: 100% (179/179), 373.32 KiB | 0 bytes/s, done.
remote: Total 179 (delta 0), reused 0 (delta 0), pack-reused 179
Resolving deltas: 100% (86/86), done.
Checking connectivity... done.
root@staging01 ~ # cd wetty/
root@staging01 ~/wetty # ls
app.js  bin  Dockerfile  Gruntfile.js  LICENSE  package.json  public  README.md  terminal.png
root@staging01 ~/wetty # docker build .
Sending build context to Docker daemon 1.024 MB
Sending build context to Docker daemon
Step 0 : FROM node:0.10.38
0.10.38: Pulling from node
64e5325c0d9d: Pull complete
bf84c1d84a8f: Pull complete
87de57de6955: Pull complete
6a974bea7c0d: Pull complete
4b708e6c0f6c: Pull complete
313c5b9e573c: Pull complete
57677419598c: Pull complete
3119a4ab2aa4: Pull complete
a214e95de806: Pull complete
e60ab1a05298: Already exists
node:0.10.38: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:e2a5045398e7f867e51c73eee2b3e6ec64716d1907c4c37acb5dee0493154d95
Status: Downloaded newer image for node:0.10.38
 ---> e60ab1a05298
Step 1 : MAINTAINER Nathan LeClaire <nathan@docker.com>
 ---> Running in f9d2c3ece1ff
 ---> 77ce142b9724
Removing intermediate container f9d2c3ece1ff
Step 2 : ADD . /app
 ---> 69942346c255
Removing intermediate container 8fffca6da6ac
Step 3 : WORKDIR /app
 ---> Running in 53d005909752
 ---> c032cc467d68
Removing intermediate container 53d005909752
Step 4 : RUN npm install
 ---> Running in 817c05550880
npm WARN deprecated static-favicon@1.0.0: use serve-favicon module

> websocket@1.0.21 install /app/node_modules/websocket
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory '/app/node_modules/websocket/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  COPY Release/bufferutil.node
  CXX(target) Release/obj.target/validation/src/validation.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  COPY Release/validation.node
make: Leaving directory '/app/node_modules/websocket/build'

> pty.js@0.2.13 install /app/node_modules/pty.js
> node-gyp rebuild

make: Entering directory '/app/node_modules/pty.js/build'
  CXX(target) Release/obj.target/pty/src/unix/pty.o
  SOLINK_MODULE(target) Release/obj.target/pty.node
  COPY Release/pty.node
make: Leaving directory '/app/node_modules/pty.js/build'
grunt-mkdir@0.1.2 node_modules/grunt-mkdir

grunt-contrib-clean@0.6.0 node_modules/grunt-contrib-clean
└── rimraf@2.2.8

optimist@0.6.1 node_modules/optimist
├── wordwrap@0.0.3
└── minimist@0.0.10

grunt-shell@1.1.2 node_modules/grunt-shell
└── chalk@1.1.0 (escape-string-regexp@1.0.3, supports-color@2.0.0, ansi-styles@2.1.0, has-ansi@2.0.0, strip-ansi@3.0.0)

grunt-git@0.3.5 node_modules/grunt-git
└── flopmang@0.0.1 (underscore.string@2.4.0, underscore@1.8.3)

load-grunt-tasks@3.2.0 node_modules/load-grunt-tasks
├── multimatch@2.0.0 (array-differ@1.0.0, array-union@1.0.1, minimatch@2.0.10)
└── findup-sync@0.2.1 (glob@4.3.5)

grunt@0.4.5 node_modules/grunt
├── dateformat@1.0.2-1.2.3
├── which@1.0.9
├── getobject@0.1.0
├── eventemitter2@0.4.14
├── rimraf@2.2.8
├── colors@0.6.2
├── async@0.1.22
├── grunt-legacy-util@0.2.0
├── hooker@0.2.3
├── exit@0.1.2
├── nopt@1.0.10 (abbrev@1.0.7)
├── minimatch@0.2.14 (sigmund@1.0.1, lru-cache@2.6.5)
├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.3)
├── lodash@0.9.2
├── coffee-script@1.3.3
├── underscore.string@2.2.1
├── iconv-lite@0.2.11
├── findup-sync@0.1.3 (glob@3.2.11, lodash@2.4.2)
├── grunt-legacy-log@0.1.2 (grunt-legacy-log-utils@0.1.1, underscore.string@2.3.3, lodash@2.4.2)
└── js-yaml@2.0.5 (argparse@0.1.16, esprima@1.0.4)

express@3.5.1 node_modules/express
├── methods@0.1.0
├── merge-descriptors@0.0.2
├── debug@0.8.1
├── cookie-signature@1.0.3
├── range-parser@1.0.0
├── fresh@0.2.2
├── buffer-crc32@0.2.1
├── cookie@0.1.1
├── mkdirp@0.3.5
├── commander@1.3.2 (keypress@0.1.0)
├── send@0.2.0 (mime@1.2.11)
└── connect@2.14.1 (response-time@1.0.0, pause@0.0.1, connect-timeout@1.0.0, method-override@1.0.0, static-favicon@1.0.0, vhost@1.0.0, qs@0.6.6, serve-static@1.0.2, morgan@1.0.0, basic-auth-connect@1.0.0, bytes@0.2.1, raw-body@1.1.3, errorhandler@1.0.0, csurf@1.0.0, cookie-parser@1.0.1, express-session@1.0.2, compression@1.0.0, serve-index@1.0.1, multiparty@2.2.0)

websocket@1.0.21 node_modules/websocket
├── yaeti@0.0.4
├── debug@2.2.0 (ms@0.7.1)
├── nan@1.8.4
└── typedarray-to-buffer@3.0.4 (is-typedarray@1.0.0)

pty.js@0.2.13 node_modules/pty.js
├── extend@1.2.1
└── nan@1.9.0
 ---> 4573e044da51
Removing intermediate container 817c05550880
Step 5 : RUN apt-get update
 ---> Running in 2f81f1072f09
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:2 http://httpredir.debian.org jessie InRelease [134 kB]
Get:3 http://httpredir.debian.org jessie-updates InRelease [123 kB]
Get:4 http://security.debian.org jessie/updates/main amd64 Packages [167 kB]
Get:5 http://httpredir.debian.org jessie/main amd64 Packages [9038 kB]
Get:6 http://httpredir.debian.org jessie-updates/main amd64 Packages [3614 B]
Fetched 9529 kB in 1s (5283 kB/s)
Reading package lists...
 ---> 5ff0e2fe849f
Removing intermediate container 2f81f1072f09
Step 6 : RUN apt-get install -y vim
 ---> Running in dd78a759f2b7
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  libgpm2 vim-common vim-runtime
Suggested packages:
  gpm ctags vim-doc vim-scripts
The following NEW packages will be installed:
  libgpm2 vim vim-common vim-runtime
0 upgraded, 4 newly installed, 0 to remove and 21 not upgraded.
Need to get 6218 kB of archives.
After this operation, 28.9 MB of additional disk space will be used.
Get:1 http://httpredir.debian.org/debian/ jessie/main libgpm2 amd64 1.20.4-6.1+b2 [34.0 kB]
Get:2 http://httpredir.debian.org/debian/ jessie/main vim-common amd64 2:7.4.488-7 [184 kB]
Get:3 http://httpredir.debian.org/debian/ jessie/main vim-runtime all 2:7.4.488-7 [5047 kB]
Get:4 http://httpredir.debian.org/debian/ jessie/main vim amd64 2:7.4.488-7 [953 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 6218 kB in 0s (6869 kB/s)
Selecting previously unselected package libgpm2:amd64.
(Reading database ... 27882 files and directories currently installed.)
Preparing to unpack .../libgpm2_1.20.4-6.1+b2_amd64.deb ...
Unpacking libgpm2:amd64 (1.20.4-6.1+b2) ...
Selecting previously unselected package vim-common.
Preparing to unpack .../vim-common_2%3a7.4.488-7_amd64.deb ...
Unpacking vim-common (2:7.4.488-7) ...
Selecting previously unselected package vim-runtime.
Preparing to unpack .../vim-runtime_2%3a7.4.488-7_all.deb ...
Adding 'diversion of /usr/share/vim/vim74/doc/help.txt to /usr/share/vim/vim74/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim74/doc/tags to /usr/share/vim/vim74/doc/tags.vim-tiny by vim-runtime'
Unpacking vim-runtime (2:7.4.488-7) ...
Selecting previously unselected package vim.
Preparing to unpack .../vim_2%3a7.4.488-7_amd64.deb ...
Unpacking vim (2:7.4.488-7) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Setting up libgpm2:amd64 (1.20.4-6.1+b2) ...
Setting up vim-common (2:7.4.488-7) ...
Setting up vim-runtime (2:7.4.488-7) ...
Processing /usr/share/vim/addons/doc
Setting up vim (2:7.4.488-7) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in auto mode
Processing triggers for libc-bin (2.19-18) ...
 ---> 4e6470060a32
Removing intermediate container dd78a759f2b7
Step 7 : RUN useradd -d /home/term -m -s /bin/bash term
 ---> Running in f86c8a83d7e3
 ---> 3f3935d65f6d
Removing intermediate container f86c8a83d7e3
Step 8 : RUN echo 'term:term' | chpasswd
 ---> Running in 2a14757a67de
 ---> 2c6abb1eae87
Removing intermediate container 2a14757a67de
Step 9 : EXPOSE 3000
 ---> Running in 4dbb2a1a117b
 ---> 5c573322bdb6
Removing intermediate container 4dbb2a1a117b
Step 10 : ENTRYPOINT node
 ---> Running in 460fb0c8dae7
 ---> eccef410a10d
Removing intermediate container 460fb0c8dae7
Step 11 : CMD app.js -p 3000
 ---> Running in c331a041e0e6
 ---> 453fffa28c25
Removing intermediate container c331a041e0e6
Successfully built 453fffa28c25
root@staging01 ~/wetty #

root@staging01 ~/wetty # docker run --name term -p 3000 -dt 453fffa28c25
2674b51b1050143a94dc5c2ceb089d4dff51ce938ba35d7f1e78e42ae3dc9aed
root@staging01 ~/wetty # 

root@staging01 ~/wetty # docker ps
CONTAINER ID        IMAGE               COMMAND                CREATED              STATUS              PORTS                     NAMES
2674b51b1050        453fffa28c25        "node app.js -p 3000   About a minute ago   Up About a minute   0.0.0.0:32768->3000/tcp   term               
root@staging01 ~/wetty #

root@staging01 ~/wetty # docker run --name term -p 3000 -dt nathanleclaire/wetty
ca4ead8e3951523195c3ae4ce2bcaf89f72f3a53d89f8d1f88f2999ab0c4c73d
root@staging01 ~/wetty # docker ps
CONTAINER ID        IMAGE                  COMMAND                CREATED             STATUS              PORTS                     NAMES
ca4ead8e3951        nathanleclaire/wetty   "node app.js -p 3000   3 seconds ago       Up 3 seconds        0.0.0.0:32769->3000/tcp   term               
root@staging01 ~/wetty #