"webpack-dev-server" command not found - Docker with Rails 6 - ruby-on-rails
I'm currently working on "dockerizing" a Rails 6 app with MySQL as backend/admin-panel with an Angular 8 app as frontend for users. I tried to run both containers with docker-compose and the frontend works perfectly but the backend has a problem. The webpack server somehow cannot be started. It always tells me that the "webpack-dev-server" cannot be found and then exits. This is odd because I let the same setup run on a Linux/Ubuntu system and it works fine but on Mac the Webpacker fails.
This is my setup:
OS Catalina: 10.15.1
Node: 10.12.0
Ruby: 2.5.5
Dockerfile:
FROM ruby:2.5.5
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \
apt-get update && \
apt-get install -qq -y \
build-essential nodejs yarn libpq-dev \
&& mkdir -p /app \
&& apt-get clean autoclean \
&& apt-get autoremove -y
WORKDIR /tmp
COPY Gemfile* /tmp/
RUN bundle install
COPY package* /tmp/
COPY yarn* /tmp/
RUN yarn install
ADD scripts/entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
WORKDIR /app
COPY . /app
EXPOSE 3000
# Start the main process.
CMD ["rails", "server", "-b", "0.0.0.0"]
docker-compose.yml:
version: '3'
services:
backend:
build: ./backend
volumes:
- ./backend:/app
- ./backend/scripts:/scripts
ports:
- "3000:3000"
dns: # Needed for making request outside the container
- 1.1.1.1
command: ["/scripts/wait-for-it.sh", "db:3306", "--", "/scripts/wait-for-it.sh", "webpacker:3035", "--", "/scripts/start_rails.sh"]
depends_on:
- db
- webpacker
- frontend
environment:
DB_PASSWORD: root
DB_HOST: db
WEBPACKER_DEV_SERVER_HOST: webpacker # overwrites the webpacker.yml -> dev_server -> hosts value
db:
image: mariadb:10.4.10
volumes:
- ./volumes/mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
webpacker:
build: ./backend
command: ["/app/bin/webpack-dev-server"]
volumes:
- ./backend:/app
ports:
- "3035:3035"
frontend: //This one works fine
build: ./frontend
volumes:
- ./frontend:/app
- ./frontend/node_modules:/app/node_modules
ports:
- '4200:4200'
webpacker.yml:
# Note: You must restart bin/webpack-dev-server for changes to take effect
default: &default
source_path: app/webpacker
source_entry_path: packs
public_root_path: public
public_output_path: packs
cache_path: tmp/cache/webpacker
check_yarn_integrity: false
webpack_compile_output: false
# Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
resolved_paths: []
# Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false
# Extract and emit a css file
extract_css: true
static_assets_extensions:
- .jpg
- .jpeg
- .png
- .gif
- .tiff
- .ico
- .svg
- .eot
- .otf
- .ttf
- .woff
- .woff2
extensions:
- .mjs
- .js
- .sass
- .scss
- .css
- .module.sass
- .module.scss
- .module.css
- .png
- .svg
- .gif
- .jpeg
- .jpg
development:
<<: *default
compile: true
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
check_yarn_integrity: false
# Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: false
host: 0.0.0.0
port: 3035
public: 0.0.0.0:3035
hmr: false
# Inline should be set to true if using HMR
inline: true
overlay: true
compress: true
disable_host_check: true
use_local_ip: false
quiet: false
headers:
'Access-Control-Allow-Origin': '*'
watch_options:
ignored: '**/node_modules/**'
test:
<<: *default
compile: true
# Compile test packs to a separate directory
public_output_path: packs-test
production:
<<: *default
# Production depends on precompilation of packs prior to booting for performance.
compile: false
# Extract and emit a css file
extract_css: true
# Cache manifest.json for performance
cache_manifest: true
Console output on "docker-compose up" (build works fine):
Creating network "lms_default" with the default driver
Creating lms_db_1 ... done
Creating lms_webpacker_1 ... done
Creating lms_frontend_1 ... done
Creating lms_backend_1 ... done
Attaching to lms_db_1, lms_frontend_1, lms_webpacker_1, lms_backend_1
frontend_1 | Your global Angular CLI version (8.3.23) is greater than your local
frontend_1 | version (8.1.3). The local Angular CLI version is used.
frontend_1 |
frontend_1 | To disable this warning use "ng config -g cli.warnings.versionMismatch false".
db_1 | 2020-01-28 12:11:25+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.10+maria~bionic started.
db_1 | 2020-01-28 12:11:26+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
db_1 | 2020-01-28 12:11:26+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.10+maria~bionic started.
backend_1 | wait-for-it.sh: waiting 15 seconds for db:3306
db_1 | 2020-01-28 12:11:26 0 [Note] mysqld (mysqld 10.4.10-MariaDB-1:10.4.10+maria~bionic) starting as process 1 ...
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Using Linux native AIO
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Uses event mutexes
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Number of pools: 1
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Using SSE2 crc32 instructions
db_1 | 2020-01-28 12:11:26 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
db_1 | 2020-01-28 12:11:26 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db_1 | 2020-01-28 12:11:27 0 [Note] InnoDB: Completed initialization of buffer pool
db_1 | 2020-01-28 12:11:27 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1 | 2020-01-28 12:11:27 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
db_1 | 2020-01-28 12:11:27 0 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1 | 2020-01-28 12:11:27 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
webpacker_1 | yarn run v1.21.1
webpacker_1 | error Command "webpack-dev-server" not found.
webpacker_1 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lms_webpacker_1 exited with code 1
db_1 | 2020-01-28 12:11:28 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
db_1 | 2020-01-28 12:11:28 0 [Note] InnoDB: 10.4.10 started; log sequence number 20282472; transaction id 14616
db_1 | 2020-01-28 12:11:28 0 [Note] Plugin 'FEEDBACK' is disabled.
db_1 | 2020-01-28 12:11:28 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
db_1 | 2020-01-28 12:11:28 0 [Note] Server socket created on IP: '::'.
db_1 | 2020-01-28 12:11:28 0 [Note] InnoDB: Buffer pool(s) load completed at 200128 12:11:28
db_1 | 2020-01-28 12:11:28 0 [Warning] 'proxies_priv' entry '#% root#c8d38e939209' ignored in --skip-name-resolve mode.
db_1 | 2020-01-28 12:11:28 0 [Note] Reading of all Master_info entries succeeded
db_1 | 2020-01-28 12:11:28 0 [Note] Added new Master_info '' to hash table
db_1 | 2020-01-28 12:11:28 0 [Note] mysqld: ready for connections.
db_1 | Version: '10.4.10-MariaDB-1:10.4.10+maria~bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
db_1 | 2020-01-28 12:11:29 8 [Warning] Aborted connection 8 to db: 'unconnected' user: 'unauthenticated' host: '192.168.0.5' (This connection closed normally without authentication)
backend_1 | wait-for-it.sh: db:3306 is available after 3 seconds
backend_1 | wait-for-it.sh: waiting 15 seconds for webpacker:3035
frontend_1 | WARNING: This is a simple server for use in testing or debugging Angular applications
frontend_1 | locally. It hasn't been reviewed for security issues.
frontend_1 |
frontend_1 | Binding this server to an open connection can result in compromising your application or
frontend_1 | computer. Using a different host than the one passed to the "--host" flag might result in
frontend_1 | websocket connection issues. You might need to use "--disableHostCheck" if that's the
frontend_1 | case.
frontend_1 | ℹ 「wds」: Project is running at http://0.0.0.0:4200/webpack-dev-server/
frontend_1 | ℹ 「wds」: webpack output is served from /
frontend_1 | ℹ 「wds」: 404s will fallback to //index.html
backend_1 | wait-for-it.sh: timeout occurred after waiting 15 seconds for webpacker:3035
frontend_1 |
frontend_1 | chunk {0} 0.js, 0.js.map () 13.2 kB [rendered]
frontend_1 | chunk {1} 1.js, 1.js.map () 19.9 kB [rendered]
frontend_1 | chunk {2} 2.js, 2.js.map () 17 kB [rendered]
frontend_1 | chunk {3} 3.js, 3.js.map () 31 kB [rendered]
frontend_1 | chunk {4} 4.js, 4.js.map () 31.1 kB [rendered]
frontend_1 | chunk {5} 5.js, 5.js.map () 57.5 kB [rendered]
frontend_1 | chunk {6} 6.js, 6.js.map () 56.2 kB [rendered]
frontend_1 | chunk {7} 7.js, 7.js.map () 4.59 kB [rendered]
frontend_1 | chunk {8} 8.js, 8.js.map () 4.64 kB [rendered]
frontend_1 | chunk {9} 9.js, 9.js.map () 9.43 kB [rendered]
frontend_1 | chunk {10} 10.js, 10.js.map () 9.97 kB [rendered]
frontend_1 | chunk {11} 11.js, 11.js.map () 3.71 kB [rendered]
frontend_1 | chunk {12} 12.js, 12.js.map () 3.7 kB [rendered]
frontend_1 | chunk {13} 13.js, 13.js.map () 22.7 kB [rendered]
frontend_1 | chunk {14} 14.js, 14.js.map () 22.8 kB [rendered]
frontend_1 | chunk {15} 15.js, 15.js.map () 12 kB [rendered]
frontend_1 | chunk {16} 16.js, 16.js.map () 11.6 kB [rendered]
frontend_1 | chunk {17} 17.js, 17.js.map () 8.39 kB [rendered]
frontend_1 | chunk {18} 18.js, 18.js.map () 8.52 kB [rendered]
frontend_1 | chunk {19} 19.js, 19.js.map () 5.61 kB [rendered]
frontend_1 | chunk {20} 20.js, 20.js.map () 5.61 kB [rendered]
frontend_1 | chunk {21} 21.js, 21.js.map () 15.9 kB [rendered]
frontend_1 | chunk {22} 22.js, 22.js.map () 66.2 kB [rendered]
frontend_1 | chunk {23} 23.js, 23.js.map () 65.9 kB [rendered]
frontend_1 | chunk {24} 24.js, 24.js.map () 19 kB [rendered]
frontend_1 | chunk {25} 25.js, 25.js.map () 18.1 kB [rendered]
frontend_1 | chunk {26} 26.js, 26.js.map () 3.42 kB [rendered]
frontend_1 | chunk {27} 27.js, 27.js.map () 12.6 kB [rendered]
frontend_1 | chunk {28} 28.js, 28.js.map () 12.6 kB [rendered]
frontend_1 | chunk {29} 29.js, 29.js.map () 14.4 kB [rendered]
frontend_1 | chunk {30} 30.js, 30.js.map () 14.3 kB [rendered]
frontend_1 | chunk {31} 31.js, 31.js.map () 25.7 kB [rendered]
frontend_1 | chunk {32} 32.js, 32.js.map () 25.6 kB [rendered]
frontend_1 | chunk {33} 33.js, 33.js.map () 39.2 kB [rendered]
frontend_1 | chunk {34} 34.js, 34.js.map () 42.8 kB [rendered]
frontend_1 | chunk {35} 35.js, 35.js.map () 13.1 kB [rendered]
frontend_1 | chunk {36} 36.js, 36.js.map () 12.8 kB [rendered]
frontend_1 | chunk {37} 37.js, 37.js.map () 31.6 kB [rendered]
frontend_1 | chunk {38} 38.js, 38.js.map () 31.7 kB [rendered]
frontend_1 | chunk {39} 39.js, 39.js.map () 14.9 kB [rendered]
frontend_1 | chunk {40} 40.js, 40.js.map () 14.9 kB [rendered]
frontend_1 | chunk {41} 41.js, 41.js.map () 37.5 kB [rendered]
frontend_1 | chunk {42} 42.js, 42.js.map () 20.5 kB [rendered]
frontend_1 | chunk {43} 43.js, 43.js.map () 19.8 kB [rendered]
frontend_1 | chunk {44} 44.js, 44.js.map () 12.6 kB [rendered]
frontend_1 | chunk {45} 45.js, 45.js.map () 12.6 kB [rendered]
frontend_1 | chunk {46} 46.js, 46.js.map () 12 kB [rendered]
frontend_1 | chunk {47} 47.js, 47.js.map () 12.2 kB [rendered]
frontend_1 | chunk {48} 48.js, 48.js.map () 20.5 kB [rendered]
frontend_1 | chunk {49} 49.js, 49.js.map () 21.9 kB [rendered]
frontend_1 | chunk {50} 50.js, 50.js.map () 18.3 kB [rendered]
frontend_1 | chunk {51} 51.js, 51.js.map () 18.3 kB [rendered]
frontend_1 | chunk {52} 52.js, 52.js.map () 12.6 kB [rendered]
frontend_1 | chunk {53} 53.js, 53.js.map () 12.6 kB [rendered]
frontend_1 | chunk {54} 54.js, 54.js.map () 6.48 kB [rendered]
frontend_1 | chunk {55} 55.js, 55.js.map () 24.4 kB [rendered]
frontend_1 | chunk {56} 56.js, 56.js.map () 26.2 kB [rendered]
frontend_1 | chunk {57} 57.js, 57.js.map () 23.9 kB [rendered]
frontend_1 | chunk {58} 58.js, 58.js.map () 15.4 kB [rendered]
frontend_1 | chunk {59} 59.js, 59.js.map () 15.1 kB [rendered]
frontend_1 | chunk {60} 60.js, 60.js.map () 21.9 kB [rendered]
frontend_1 | chunk {61} 61.js, 61.js.map () 21.9 kB [rendered]
frontend_1 | chunk {62} 62.js, 62.js.map () 36.8 kB [rendered]
frontend_1 | chunk {63} 63.js, 63.js.map () 36.8 kB [rendered]
frontend_1 | chunk {64} 64.js, 64.js.map () 10.7 kB [rendered]
frontend_1 | chunk {65} 65.js, 65.js.map () 6.5 kB [rendered]
frontend_1 | chunk {66} 66.js, 66.js.map () 6.49 kB [rendered]
frontend_1 | chunk {67} 67.js, 67.js.map () 14.2 kB [rendered]
frontend_1 | chunk {68} 68.js, 68.js.map () 14.4 kB [rendered]
frontend_1 | chunk {69} 69.js, 69.js.map () 8.34 kB [rendered]
frontend_1 | chunk {70} 70.js, 70.js.map () 1.84 kB [rendered]
frontend_1 | chunk {71} 71.js, 71.js.map () 12.4 kB [rendered]
frontend_1 | chunk {72} 72.js, 72.js.map () 12.4 kB [rendered]
frontend_1 | chunk {73} 73.js, 73.js.map () 18.1 kB [rendered]
frontend_1 | chunk {74} 74.js, 74.js.map () 18.7 kB [rendered]
frontend_1 | chunk {75} 75.js, 75.js.map () 11 kB [rendered]
frontend_1 | chunk {76} 76.js, 76.js.map () 10.9 kB [rendered]
frontend_1 | chunk {77} 77.js, 77.js.map () 20.2 kB [rendered]
frontend_1 | chunk {common} common.js, common.js.map (common) 30.6 kB [rendered]
frontend_1 | chunk {core-js-js} core-js-js.js, core-js-js.js.map (core-js-js) 78.7 kB [rendered]
frontend_1 | chunk {css-shim-206ea950-3169f23e-js} css-shim-206ea950-3169f23e-js.js, css-shim-206ea950-3169f23e-js.js.map (css-shim-206ea950-3169f23e-js) 21.9 kB [rendered]
frontend_1 | chunk {dom-96781eef-a2fb04dd-js} dom-96781eef-a2fb04dd-js.js, dom-96781eef-a2fb04dd-js.js.map (dom-96781eef-a2fb04dd-js) 19.8 kB [rendered]
frontend_1 | chunk {dom-js} dom-js.js, dom-js.js.map (dom-js) 20.2 kB [rendered]
frontend_1 | chunk {focus-visible-70713a0c-js} focus-visible-70713a0c-js.js, focus-visible-70713a0c-js.js.map (focus-visible-70713a0c-js) 2.15 kB [rendered]
frontend_1 | chunk {hardware-back-button-5afe3cb0-js} hardware-back-button-5afe3cb0-js.js, hardware-back-button-5afe3cb0-js.js.map (hardware-back-button-5afe3cb0-js) 2.06 kB [rendered]
frontend_1 | chunk {home-home-module} home-home-module.js, home-home-module.js.map (home-home-module) 34.4 kB [rendered]
frontend_1 | chunk {index-69c37885-js} index-69c37885-js.js, index-69c37885-js.js.map (index-69c37885-js) 37.7 kB [rendered]
frontend_1 | chunk {input-shims-7a8a317c-js} input-shims-7a8a317c-js.js, input-shims-7a8a317c-js.js.map (input-shims-7a8a317c-js) 13.5 kB [rendered]
frontend_1 | chunk {ios-transition-becf5388-js} ios-transition-becf5388-js.js, ios-transition-becf5388-js.js.map (ios-transition-becf5388-js) 24.7 kB [rendered]
frontend_1 | chunk {leaderboard-leaderboard-module} leaderboard-leaderboard-module.js, leaderboard-leaderboard-module.js.map (leaderboard-leaderboard-module) 20.8 kB [rendered]
frontend_1 | chunk {login-login-module} login-login-module.js, login-login-module.js.map (login-login-module) 5.73 kB [rendered]
frontend_1 | chunk {main} main.js, main.js.map (main) 40.9 kB [initial] [rendered]
frontend_1 | chunk {md-transition-f444ed6d-js} md-transition-f444ed6d-js.js, md-transition-f444ed6d-js.js.map (md-transition-f444ed6d-js) 3.46 kB [rendered]
frontend_1 | chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 278 kB [initial] [rendered]
frontend_1 | chunk {profile-profile-module} profile-profile-module.js, profile-profile-module.js.map (profile-profile-module) 19.8 kB [rendered]
frontend_1 | chunk {quiz-quiz-module} quiz-quiz-module.js, quiz-quiz-module.js.map (quiz-quiz-module) 22.5 kB [rendered]
frontend_1 | chunk {quiz-result-quiz-result-module} quiz-result-quiz-result-module.js, quiz-result-quiz-result-module.js.map (quiz-result-quiz-result-module) 21.2 kB [rendered]
frontend_1 | chunk {runtime} runtime.js, runtime.js.map (runtime) 10 kB [entry] [rendered]
frontend_1 | chunk {shadow-css-4889ae62-23996f3f-js} shadow-css-4889ae62-23996f3f-js.js, shadow-css-4889ae62-23996f3f-js.js.map (shadow-css-4889ae62-23996f3f-js) 14.8 kB [rendered]
frontend_1 | chunk {status-tap-7ab22cb8-js} status-tap-7ab22cb8-js.js, status-tap-7ab22cb8-js.js.map (status-tap-7ab22cb8-js) 1.79 kB [rendered]
frontend_1 | chunk {styles} styles.js, styles.js.map (styles) 112 kB [initial] [rendered]
frontend_1 | chunk {swipe-back-35ad8e37-js} swipe-back-35ad8e37-js.js, swipe-back-35ad8e37-js.js.map (swipe-back-35ad8e37-js) 2.68 kB [rendered]
frontend_1 | chunk {swiper-bundle-ccdaac54-js} swiper-bundle-ccdaac54-js.js, swiper-bundle-ccdaac54-js.js.map (swiper-bundle-ccdaac54-js) 176 kB [rendered]
frontend_1 | chunk {tabs-tabs-module} tabs-tabs-module.js, tabs-tabs-module.js.map (tabs-tabs-module) 8.14 kB [rendered]
frontend_1 | chunk {tap-click-1f9d539e-js} tap-click-1f9d539e-js.js, tap-click-1f9d539e-js.js.map (tap-click-1f9d539e-js) 6.37 kB [rendered]
frontend_1 | chunk {vendor} vendor.js, vendor.js.map (vendor) 5.03 MB [initial] [rendered]
frontend_1 | Date: 2020-01-28T12:11:46.647Z - Hash: f5c10ec9500752dc7639 - Time: 15503ms
frontend_1 | ** Angular Live Development Server is listening on 0.0.0.0:4200, open your browser on http://localhost:4200/ **
frontend_1 | ℹ 「wdm」: Compiled successfully.
backend_1 | Database 'swm_lms_development' already exists
backend_1 | Database 'swm_lms_test' already exists
backend_1 | => Booting Puma
backend_1 | => Rails 6.0.0 application starting in development
backend_1 | => Run `rails server --help` for more startup options
backend_1 | Puma starting in single mode...
backend_1 | * Version 3.12.1 (ruby 2.5.5-p157), codename: Llamas in Pajamas
backend_1 | * Min threads: 5, max threads: 5
backend_1 | * Environment: development
backend_1 | * Listening on tcp://0.0.0.0:3000
backend_1 | Use Ctrl-C to stop
Here the browser output of the rails project
Unfortunately I could'nt find any solution for my problem so I hope that someone here can help me. Thanks in advance!
Related
selenium remote hanging in docker
Same as here. docker-compose.yml version: '3' services: db: image: postgres environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=my_app ports: - '5432:5432' chrome: image: selenium/standalone-chrome hostname: chrome privileged: true shm_size: 2g web: build: . image: my-app ports: - "8000:8000" depends_on: - db command: sh -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000" volumes: - .:/code environment: - DB_USER=postgres - DB_PASSWORD=postgres - DB_HOST=db - DB_NAME=my_app everything starts as expected % docker compose build && docker compose up [+] Building 3.4s (11/11) FINISHED => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 189B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 34B 0.0s => [internal] load metadata for docker.io/library/python:3.11.1-bullseye 3.1s => [auth] library/python:pull token for registry-1.docker.io 0.0s => [internal] load build context 0.1s => => transferring context: 8.58kB 0.0s => [1/5] FROM docker.io/library/python:3.11.1-bullseye#sha256:cc4910af48 0.0s => CACHED [2/5] COPY requirements.txt requirements.txt 0.0s => CACHED [3/5] RUN pip install -r requirements.txt 0.0s => CACHED [4/5] COPY . /app 0.0s => CACHED [5/5] WORKDIR /app 0.0s => exporting to image 0.0s => => exporting layers 0.0s => => writing image sha256:10e58eeb73e4651e1e1aedb921fdde3b389cadc204787 0.0s => => naming to docker.io/library/my-app 0.0s Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them [+] Running 3/3 ⠿ Container my_app-db-1 Created 0.0s ⠿ Container my_app-chrome-1 Created 0.0s ⠿ Container my_app-web-1 Recreated 0.2s Attaching to my_app-chrome-1, my_app-db-1, my_app-web-1 my_app-db-1 | my_app-db-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization my_app-db-1 | my_app-db-1 | 2023-01-08 14:01:28.671 UTC [1] LOG: starting PostgreSQL 15.1 (Debian 15.1-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit my_app-db-1 | 2023-01-08 14:01:28.672 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 my_app-db-1 | 2023-01-08 14:01:28.673 UTC [1] LOG: listening on IPv6 address "::", port 5432 my_app-db-1 | 2023-01-08 14:01:28.688 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" my_app-db-1 | 2023-01-08 14:01:28.699 UTC [28] LOG: database system was shut down at 2023-01-08 13:54:14 UTC my_app-db-1 | 2023-01-08 14:01:28.720 UTC [1] LOG: database system is ready to accept connections my_app-chrome-1 | 2023-01-08 14:01:28,791 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing my_app-chrome-1 | 2023-01-08 14:01:28,803 INFO RPC interface 'supervisor' initialized my_app-chrome-1 | 2023-01-08 14:01:28,803 CRIT Server 'unix_http_server' running without any HTTP authentication checking my_app-chrome-1 | 2023-01-08 14:01:28,808 INFO supervisord started with pid 8 my_app-chrome-1 | 2023-01-08 14:01:29,811 INFO spawned: 'xvfb' with pid 10 my_app-chrome-1 | 2023-01-08 14:01:29,819 INFO spawned: 'vnc' with pid 11 my_app-chrome-1 | 2023-01-08 14:01:29,833 INFO spawned: 'novnc' with pid 12 my_app-chrome-1 | 2023-01-08 14:01:29,849 INFO spawned: 'selenium-standalone' with pid 14 my_app-chrome-1 | Setting up SE_NODE_GRID_URL... my_app-chrome-1 | 2023-01-08 14:01:29,911 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) my_app-chrome-1 | 2023-01-08 14:01:29,913 INFO success: vnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) my_app-chrome-1 | 2023-01-08 14:01:29,913 INFO success: novnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) my_app-chrome-1 | 2023-01-08 14:01:29,914 INFO success: selenium-standalone entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) my_app-chrome-1 | Selenium Grid Standalone configuration: my_app-chrome-1 | [network] my_app-chrome-1 | relax-checks = true my_app-chrome-1 | my_app-chrome-1 | [node] my_app-chrome-1 | session-timeout = "300" my_app-chrome-1 | override-max-sessions = false my_app-chrome-1 | detect-drivers = false my_app-chrome-1 | drain-after-session-count = 0 my_app-chrome-1 | max-sessions = 1 my_app-chrome-1 | my_app-chrome-1 | [[node.driver-configuration]] my_app-chrome-1 | display-name = "chrome" my_app-chrome-1 | stereotype = '{"browserName": "chrome", "browserVersion": "108.0", "platformName": "Linux"}' my_app-chrome-1 | max-sessions = 1 my_app-chrome-1 | my_app-chrome-1 | Starting Selenium Grid Standalone... my_app-chrome-1 | Tracing is disabled my_app-web-1 | Operations to perform: my_app-web-1 | Apply all migrations: admin, auth, contenttypes, core, sessions my_app-web-1 | Running migrations: my_app-web-1 | No migrations to apply. my_app-web-1 | Watching for file changes with StatReloader my_app-web-1 | Performing system checks... my_app-web-1 | my_app-web-1 | System check identified no issues (0 silenced). my_app-web-1 | January 08, 2023 - 14:01:33 my_app-web-1 | Django version 4.1.5, using settings 'my_app.settings' my_app-web-1 | Starting development server at http://0.0.0.0:8000/ my_app-web-1 | Quit the server with CONTROL-C. my_app-chrome-1 | 14:01:33.430 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding my_app-chrome-1 | 14:01:33.453 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing my_app-chrome-1 | 14:01:35.487 INFO [NodeOptions.getSessionFactories] - Detected 2 available processors my_app-chrome-1 | 14:01:35.608 INFO [NodeOptions.report] - Adding chrome for {"browserVersion": "108.0","se:noVncPort": 7900,"browserName": "chrome","platformName": "LINUX","se:vncEnabled": true} 1 times my_app-chrome-1 | 14:01:35.649 INFO [Node.<init>] - Binding additional locator mechanisms: name, relative, id my_app-chrome-1 | 14:01:35.709 INFO [GridModel.setAvailability] - Switching Node 9f76899f-6574-4e21-9413-d6141aa6c584 (uri: http://172.25.0.2:4444) from DOWN to UP my_app-chrome-1 | 14:01:35.709 INFO [LocalDistributor.add] - Added node 9f76899f-6574-4e21-9413-d6141aa6c584 at http://172.25.0.2:4444. Health check every 120s my_app-chrome-1 | 14:01:36.147 INFO [Standalone.execute] - Started Selenium Standalone 4.7.2 (revision 4d4020c3b7): http://172.25.0.2:4444 The logs indicate selenium is currently available at http://172.25.0.2:4444, so I try: >>> from selenium.webdriver import ChromeOptions, Remote >>> options = ChromeOptions() >>> options.add_argument('--headless') >>> driver = Remote('http://172.25.0.2:4444') It keeps hanging forever and no special output / log messages / anything further happens, it just keeps hanging until ^c. So how exactly is this supposed to be used? Also for some reason, if the ip address is replaced with http://chrome:4444, the connection is refused.
How to make Webpacker compiling instantly in my Rails project?
When I start my server with docker-compose up rails command, there is shows a [Webpacker] Compiling... which goes for about a ten seconds and then it gives this output rails_1 | [Webpacker] Compilation failed: rails_1 | Hash: e1d0cde8c28f1ff2a0a2 rails_1 | Version: webpack 4.46.0 rails_1 | Time: 19214ms rails_1 | Built at: 03/17/2022 11:42:08 AM rails_1 | Asset Size Chunks Chunk Names rails_1 | js/application-e9da3e13d93a6c1058bd.js 5.54 MiB application [emitted] [immutable] application rails_1 | js/application-e9da3e13d93a6c1058bd.js.map 5.14 MiB application [emitted] [dev] application rails_1 | js/board-48bc7b5cbf760044039a.js 3.77 MiB board [emitted] [immutable] board rails_1 | js/board-48bc7b5cbf760044039a.js.map 3.88 MiB board [emitted] [dev] board rails_1 | js/provider-c2471a0d3965537a7a3f.js 3.74 MiB provider [emitted] [immutable] provider rails_1 | js/provider-c2471a0d3965537a7a3f.js.map 3.85 MiB provider [emitted] [dev] provider rails_1 | js/server_rendering-a1f5869b9a9be21b0a76.js 9.15 MiB server_rendering [emitted] [immutable] server_rendering rails_1 | js/server_rendering-a1f5869b9a9be21b0a76.js.map 8.51 MiB server_rendering [emitted] [dev] server_rendering rails_1 | manifest.json 1.61 KiB [emitted] rails_1 | media/fonts/OpenSans-Regular-d7d7b8359eeb9cddfba6cd4cef3c1702.ttf 127 KiB [emitted] rails_1 | media/fonts/OpenSans-SemiBold-d7261533b9a545ddc769dc2fe86dc40e.ttf 127 KiB [emitted] rails_1 | media/images/logo-cfbdadde.png 1.07 KiB [emitted] rails_1 | Entrypoint application = js/application-e9da3e13d93a6c1058bd.js js/application-e9da3e13d93a6c1058bd.js.map rails_1 | Entrypoint board = js/board-48bc7b5cbf760044039a.js js/board-48bc7b5cbf760044039a.js.map rails_1 | Entrypoint provider = js/provider-c2471a0d3965537a7a3f.js js/provider-c2471a0d3965537a7a3f.js.map rails_1 | Entrypoint server_rendering = js/server_rendering-a1f5869b9a9be21b0a76.js js/server_rendering-a1f5869b9a9be21b0a76.js.map rails_1 | [./app/assets/images/logo.png] 76 bytes {application} {server_rendering} [built] rails_1 | [./app/javascript/components sync recursive ^\.\/.*$] ./app/javascript/components sync ^\.\/.*$ 9.05 KiB {server_rendering} [built] rails_1 | [./app/javascript/components/app.tsx] 5.63 KiB {application} {server_rendering} [built] rails_1 | [./app/javascript/components/provider/index.js] 49 bytes {provider} {server_rendering} [built] rails_1 | [./app/javascript/components/subscription/index.js] 62 bytes {board} {server_rendering} [built] rails_1 | [./app/javascript/packs/application.js] 1.71 KiB {application} [built] rails_1 | [./app/javascript/packs/board.jsx] 1.13 KiB {board} [built] rails_1 | [./app/javascript/packs/provider.js] 381 bytes {provider} [built] rails_1 | [./app/javascript/packs/server_rendering.js] 301 bytes {server_rendering} [built] rails_1 | [./app/javascript/utils/apollo.js] 5.34 KiB {board} {provider} {server_rendering} [built] rails_1 | [./node_modules/react-apollo/lib/react-apollo.esm.js] 487 bytes {board} {provider} {server_rendering} [built] rails_1 | [./node_modules/react-dom/index.js] 1.32 KiB {application} {board} {provider} {server_rendering} [built] rails_1 | [./node_modules/react-router-dom/index.js] 15.2 KiB {application} {server_rendering} [built] rails_1 | [./node_modules/react/index.js] 189 bytes {application} {board} {provider} {server_rendering} [built] rails_1 | [./node_modules/react_ujs/react_ujs/index.js] 6.3 KiB {server_rendering} [built] rails_1 | + 1550 hidden modules rails_1 | rails_1 | WARNING in ./node_modules/graphql-ruby-client/sync/prepareRelay.js 41:22-47 rails_1 | Critical dependency: the request of a dependency is an expression rails_1 | # ./node_modules/graphql-ruby-client/sync/generateClient.js rails_1 | # ./node_modules/graphql-ruby-client/index.js rails_1 | # ./app/javascript/utils/apollo.js rails_1 | # ./app/javascript/packs/board.jsx rails_1 | rails_1 | ERROR in ./app/javascript/components/action-item/action-item.jsx 303:13-28 rails_1 | "export 'handleKeyPress' (imported as '_handleKeyPress') was not found in '../../utils/helpers' rails_1 | # ./app/javascript/components sync ^\.\/.*$ rails_1 | # ./app/javascript/packs/server_rendering.js rails_1 | rails_1 | ERROR in ./app/javascript/components/new-action-item/new-action-item.jsx 141:13-28 rails_1 | "export 'handleKeyPress' (imported as '_handleKeyPress') was not found in '../../utils/helpers' rails_1 | # ./app/javascript/components sync ^\.\/.*$ rails_1 | # ./app/javascript/packs/server_rendering.js rails_1 | rails_1 | ERROR in ./app/javascript/components/new-card-body/new-card-body.jsx 188:13-27 rails_1 | "export 'handleKeyPress' was not found in '../../utils/helpers' rails_1 | # ./app/javascript/components sync ^\.\/.*$ rails_1 | # ./app/javascript/packs/server_rendering.js rails_1 | rails_1 | ERROR in ./app/javascript/components/comments-dropdown/comments-dropdown.jsx 181:13-27 rails_1 | "export 'handleKeyPress' was not found in '../../utils/helpers' rails_1 | # ./app/javascript/components sync ^\.\/.*$ rails_1 | # ./app/javascript/packs/server_rendering.js rails_1 | rails_1 | ERROR in ./app/javascript/components/card-body/card-body.jsx 222:13-27 rails_1 | "export 'handleKeyPress' was not found in '../../utils/helpers' rails_1 | # ./app/javascript/components sync ^\.\/.*$ rails_1 | # ./app/javascript/packs/server_rendering.js rails_1 | rails_1 | ERROR in ./node_modules/graphql-ruby-client/subscriptions/ActionCableLink.js rails_1 | Module not found: Error: Can't resolve '#apollo/client/core' in '/app/node_modules/graphql-ruby-client/subscriptions' rails_1 | # ./node_modules/graphql-ruby-client/subscriptions/ActionCableLink.js 33:13-43 rails_1 | # ./node_modules/graphql-ruby-client/index.js rails_1 | # ./app/javascript/utils/apollo.js rails_1 | # ./app/javascript/packs/board.jsx rails_1 | rails_1 | ERROR in ./node_modules/graphql-ruby-client/subscriptions/PusherLink.js rails_1 | Module not found: Error: Can't resolve '#apollo/client/core' in '/app/node_modules/graphql-ruby-client/subscriptions' rails_1 | # ./node_modules/graphql-ruby-client/subscriptions/PusherLink.js 68:13-43 rails_1 | # ./node_modules/graphql-ruby-client/index.js rails_1 | # ./app/javascript/utils/apollo.js rails_1 | # ./app/javascript/packs/board.jsx rails_1 | rails_1 | ERROR in ./node_modules/graphql-ruby-client/subscriptions/AblyLink.js rails_1 | Module not found: Error: Can't resolve '#apollo/client/core' in '/app/node_modules/graphql-ruby-client/subscriptions' rails_1 | # ./node_modules/graphql-ruby-client/subscriptions/AblyLink.js 70:13-43 rails_1 | # ./node_modules/graphql-ruby-client/index.js rails_1 | # ./app/javascript/utils/apollo.js rails_1 | # ./app/javascript/packs/board.jsx rails_1 | rails_1 | ERROR in ./node_modules/graphql-ruby-client/subscriptions/createRelaySubscriptionHandler.js rails_1 | Module not found: Error: Can't resolve 'relay-runtime' in '/app/node_modules/graphql-ruby-client/subscriptions' rails_1 | # ./node_modules/graphql-ruby-client/subscriptions/createRelaySubscriptionHandler.js 14:22-46 rails_1 | # ./node_modules/graphql-ruby-client/index.js rails_1 | # ./app/javascript/utils/apollo.js rails_1 | # ./app/javascript/packs/board.jsx I found that answer that helps me a bit. But now, when I start ./bin/webpack-dev-server in a separate window, it gives me this ./bin/webpack-dev-server <i> [webpack-dev-server] Project is running at: <i> [webpack-dev-server] Loopback: http://localhost:8080/ <i> [webpack-dev-server] On Your Network (IPv4): http://192.168.0.13:8080/ <i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::b537:10:b5dc:9bb5]:8080/ <i> [webpack-dev-server] Content not from webpack is served from '/home/yarikhrom/Work/retrospective/retrospective/public' directory node:internal/crypto/hash:67 this[kHandle] = new _Hash(algorithm, xofLen); ^ Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:135:10) at module.exports (/home/yarikhrom/Work/retrospective/retrospective/node_modules/webpack/lib/util/createHash.js:135:53) at NormalModule._initBuildHash (/home/yarikhrom/Work/retrospective/retrospective/node_modules/webpack/lib/NormalModule.js:417:16) at handleParseError (/home/yarikhrom/Work/retrospective/retrospective/node_modules/webpack/lib/NormalModule.js:471:10) at /home/yarikhrom/Work/retrospective/retrospective/node_modules/webpack/lib/NormalModule.js:503:5 at /home/yarikhrom/Work/retrospective/retrospective/node_modules/webpack/lib/NormalModule.js:358:12 at /home/yarikhrom/Work/retrospective/retrospective/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/home/yarikhrom/Work/retrospective/retrospective/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at iterateNormalLoaders (/home/yarikhrom/Work/retrospective/retrospective/node_modules/loader-runner/lib/LoaderRunner.js:221:10) { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' } Node.js v17.7.1 Also i found in documentation that I need to work with file webpack.config.js, but I don't have this one in my project. So, what can I do to make my webpacker compile insantly when I start a project or making changes in a frontend part? docker-compose.yml: version: "3.7" services: app: &app build: context: . dockerfile: ./.dockerdev/Dockerfile args: RUBY_VERSION: "2.7.0" PG_MAJOR: "11" NODE_MAJOR: "12" YARN_VERSION: "1.19.1" BUNDLER_VERSION: "2.2.25" image: example-dev:1.0.0 tmpfs: - /tmp backend: &backend <<: *app stdin_open: true tty: true volumes: - .:/app:cached - ./node_modules:/app/node_modules - .dockerdev/.psqlrc:/root/.psqlrc:ro - .dockerdev/bundle:/bundle - rails_cache:/app/tmp/cache - packs:/app/public/packs environment: - NODE_ENV=development - RAILS_ENV=${RAILS_ENV:-development} - REDIS_URL=redis://redis:6379/ - DATABASE_URL=postgres://postgres:postgres#postgres:5432 - POSTGRESQL_HOST=postgres - POSTGRESQL_PORT=5432 - WEBPACKER_DEV_SERVER_HOST=webpacker - WEB_CONCURRENCY=1 - HISTFILE=/app/log/.bash_history - PSQL_HISTFILE=/app/log/.psql_history - EDITOR=vi depends_on: - postgres - redis runner: <<: *backend command: /bin/bash ports: - "3000:3000" - "3002:3002" rails: <<: *backend command: bundle exec rails server -b 0.0.0.0 ports: - "3000:3000" postgres: image: postgres:11.1 volumes: - .dockerdev/.psqlrc:/root/.psqlrc:ro - ./log:/root/log:cached - postgres:/var/lib/postgresql/data environment: - PSQL_HISTFILE=/root/log/.psql_history ports: - "5432:5432" redis: image: redis:3.2-alpine volumes: - redis:/data ports: - "6379:6379" webpacker: <<: *app command: ./bin/webpack-dev-server ports: - "3035:3035" volumes: - .:/app:cached - ./node_modules:/app/node_modules - .dockerdev/bundle:/bundle - packs:/app/public/packs environment: - NODE_ENV=${NODE_ENV:-development} - RAILS_ENV=${RAILS_ENV:-development} - WEBPACKER_DEV_SERVER_HOST=0.0.0.0 volumes: postgres: redis: node_modules: rails_cache: packs:
I think that i had this issue too, i fixed this putting rails and webpacker in the same container, is not the best solution but it works, something like this: docker-compose.yml version: '3' services: web: build: context: . dockerfile: ./docker/development/Dockerfile command: ["sh", "./docker/development/scripts/start-rails-development-server.sh"] volumes: - .:/app ports: - 3000:3000 - 3035:3035 depends_on: - database start-rails-development-server.sh #!/bin/sh echo 'Starting webpack dev server ...' && bin/webpack-dev-server & echo 'starting Rails server ...' && rm -f tmp/pids/server.pid && bundle exec rails s -b 0.0.0.0
Problem with using GPU with Docker-compose
I want to run a container based on python:3.8.8-slim-buster that needs access to the GPU. When I build it from this Dockerfile: FROM python:3.8.8-slim-buster CMD ["sleep", "infinity"] and then run it with "--gpus all" flag and exec nvidia-smi i get a proper response: Sat Jun 19 12:26:57 2021 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 465.27 Driver Version: 465.27 CUDA Version: 11.3 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A | | N/A 45C P8 N/A / N/A | 301MiB / 1878MiB | 14% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| +-----------------------------------------------------------------------------+ and when I use this docker-compose: services: test: image: tensorflow/tensorflow:2.5.0-gpu command: sleep infinity deploy: resources: reservations: devices: - capabilities: [gpu] and exec nvidia-smi after running it i get the same response. But when i replace the image in the docker-compose to python:3.8.8-slim-buster like in the Dockerfile, i get this response: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "nvidia-smi": executable file not found in $PATH: unknown I appreciate any help figuring this out.
docker-compose can't found nvidia dirver
I am trying to run the clara train example, but when I execute the startClaraTrainNoteBooks.sh, the container cannot find the nvidia driver. I already know that the script executes docker-compose.yml. So I tested whether docker-compose can found the nvidia driver: services: test: image: nvidia/cuda:10.2-base command: nvidia-smi deploy: resources: reservations: devices: - driver: nvidia capabilities: [gpu] device_ids: ['0'] Output: USER#test:~$ docker-compose up WARNING: Found orphan containers (hp_nvsmi_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. Starting hp_test_1 ... done Attaching to hp_test_1 test_1 | Mon Jun 7 09:01:44 2021 test_1 | +-----------------------------------------------------------------------------+ test_1 | | NVIDIA-SMI 460.27.04 Driver Version: 460.27.04 CUDA Version: 11.2 | test_1 | |-------------------------------+----------------------+----------------------+ test_1 | | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | test_1 | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | test_1 | | | | MIG M. | test_1 | |===============================+======================+======================| test_1 | | 0 GeForce RTX 206... Off | 00000000:01:00.0 Off | N/A | test_1 | | 0% 34C P8 17W / 215W | 100MiB / 7979MiB | 0% Default | test_1 | | | | N/A | test_1 | +-------------------------------+----------------------+----------------------+ test_1 | test_1 | +-----------------------------------------------------------------------------+ test_1 | | Processes: | test_1 | | GPU GI CI PID Type Process name GPU Memory | test_1 | | ID ID Usage | test_1 | |=============================================================================| test_1 | +-----------------------------------------------------------------------------+ hp_test_1 exited with code 0 But the startClaraTrainNoteBooks.sh cna not find it. root#claratrain:/claraDevDay# nvidia-smi root#claratrain:/claraDevDay# Actually, startDocker.sh can find the driver. root#c7c2d5597eb8:/claraDevDay# nvidia-smi Mon Jun 7 09:11:43 2021 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 460.27.04 Driver Version: 460.27.04 CUDA Version: 11.2 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 GeForce RTX 206... Off | 00000000:01:00.0 Off | N/A | | 0% 35C P8 17W / 215W | 100MiB / 7979MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| +-----------------------------------------------------------------------------+ root#c7c2d5597eb8:/claraDevDay# What should I do?
The docker-compose.yml script need to rewrite like this and working: # SPDX-License-Identifier: Apache-2.0 version: "3.8" services: claratrain: container_name: claradevday-pt hostname: claratrain ##### use vanilla clara train docker #image: nvcr.io/nvidia/clara-train-sdk:v4.0 ##### to build image with GPU dashboard inside jupyter lab build: context: ./dockerWGPUDashboardPlugin/ # Project root dockerfile: ./Dockerfile # Relative to context image: clara-train-nvdashboard:v4.0 depends_on: - tritonserver ports: - "3030:8888" # Jupyter lab port - "3031:5000" # AIAA port ipc: host volumes: - ${TRAIN_DEV_DAY_ROOT}:/claraDevDay/ - /raid/users/aharouni/data:/data/ command: "jupyter lab /claraDevDay --ip 0.0.0.0 --allow-root --no-browser --config /claraDevDay/scripts/jupyter_notebook_config.py" # command: tail -f /dev/null # tty: true deploy: resources: reservations: devices: - driver: nvidia capabilities: [ gpu ] # To specify certain GPU uncomment line below #device_ids: ['0,3'] ############################################################# tritonserver: image: nvcr.io/nvidia/tritonserver:21.02-py3 container_name: aiaa-triton hostname: tritonserver restart: unless-stopped command: > sh -c "chmod 777 /triton_models && /opt/tritonserver/bin/tritonserver \ --model-store /triton_models \ --model-control-mode="poll" \ --repository-poll-secs=5 \ --log-verbose ${TRITON_VERBOSE}" volumes: - ${TRAIN_DEV_DAY_ROOT}/AIAA/workspace/triton_models:/triton_models # shm_size: 1gb # ulimits: # memlock: -1 # stack: 67108864 # logging: # driver: json-file
Rails, Webpacker, and Docker : Cannot assign requested address - connect(2) for [::1]:3035
I'm trying to get webpacker working with docker, puma 3.10.0, rails 5.1.4, and webpacker 3.0.1. I have the following config set up for docker: Dockerfile FROM ruby:2.4.1 ENV DIR=/app \ BUNDLE_JOBS=4 RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs openssl yarn RUN mkdir $DIR WORKDIR $DIR ADD Gemfile $DIR/Gemfile ADD Gemfile.lock $DIR/Gemfile.lock RUN bundle install RUN gem install foreman ADD . $DIR EXPOSE 3000 ADD docker-entrypoint.sh /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD bundle exec rails s -p 3000 -b 0.0.0.0 docker-compose.yml version: "2" services: db: image: postgres env_file: - docker.env webpacker: build: . command: bundle exec bin/webpack-dev-server ports: - "8080:8080" app: build: . links: - db:db ports: - "3000:3000" depends_on: - db - webpacker env_file: - docker.env command: bundle exec rails s -p 3000 -b '0.0.0.0' Unfortunately, whenever I run docker-compose up and visit localhost:3000, I get the following error: #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035> Any help is greatly appreciated. Thank you people. EDIT below is the log from my webpack and app containers: webpacker_1 | webpacker_1 | Project is running at http://localhost:3035/ webpacker_1 | webpack output is served from /packs/ webpacker_1 | Content not from webpack is served from /app/public/packs webpacker_1 | 404s will fallback to /index.html webpacker_1 | Running /app/node_modules/.bin/elm-make /app/app/javascript/packs/Main.elm --yes --warn --debug --output /tmp/117813-1-17kg4e0.13yc01wcdi.js webpacker_1 | 14% building modules 40/57 Success! Compiled 1 module./lib/transport/xhr-streaming.js webpacker_1 | Successfully generated /tmp/117813-1-17kg4e0.13yc01wcdi.js webpacker_1 | 94% asset optimHash: 0fba3c9f83d08f099017 webpacker_1 | Version: webpack 3.5.6 webpacker_1 | Time: 4214ms webpacker_1 | Asset Size Chunks Chunk Names webpacker_1 | hello_elm-a49ad0a3ed48411416eb.js 1.87 MB 0 [emitted] [big] hello_elm webpacker_1 | Main-f0a26307d1db1882a32b.js 1.87 MB 1 [emitted] [big] Main webpacker_1 | application-963cd78993444428f61c.js 896 kB 2 [emitted] [big] application webpacker_1 | manifest.json 182 bytes [emitted] webpacker_1 | [34] (webpack)-dev-server/client?http://localhost:3035 5.83 kB {0} {1} {2} [built] webpacker_1 | [35] ./node_modules/url/url.js 23.3 kB {0} {1} {2} [built] webpacker_1 | [41] ./node_modules/strip-ansi/index.js 161 bytes {0} {1} {2} [built] webpacker_1 | [43] ./node_modules/loglevel/lib/loglevel.js 7.74 kB {0} {1} {2} [built] webpacker_1 | [44] (webpack)-dev-server/client/socket.js 856 bytes {0} {1} {2} [built] webpacker_1 | [45] ./node_modules/sockjs-client/lib/entry.js 244 bytes {0} {1} {2} [built] webpacker_1 | [77] (webpack)-dev-server/client/overlay.js 3.6 kB {0} {1} {2} [built] webpacker_1 | [82] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} {1} {2} [built] webpacker_1 | [84] (webpack)/hot/emitter.js 77 bytes {0} {1} {2} [built] webpacker_1 | [86] ./app/javascript/packs/Main.elm 335 kB {0} {1} [built] webpacker_1 | [87] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/application.js 40 bytes {2} [built] webpacker_1 | [88] ./app/javascript/packs/application.js 515 bytes {2} [built] webpacker_1 | [89] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/hello_elm.js 40 bytes {0} [built] webpacker_1 | [90] ./app/javascript/packs/hello_elm.js 396 bytes {0} [built] webpacker_1 | [91] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/Main.elm 40 bytes {1} [built] webpacker_1 | + 77 hidden modules webpacker_1 | webpack: Compiled successfully. webpacker_1 | Project is running at http://localhost:3035/ webpacker_1 | webpack output is served from /packs/ webpacker_1 | Content not from webpack is served from /app/public/packs webpacker_1 | 404s will fallback to /index.html webpacker_1 | Running /app/node_modules/.bin/elm-make /app/app/javascript/packs/Main.elm --yes --warn --debug --output /tmp/117813-1-1lm55js.r9mkgzm2t9.js webpacker_1 | 14% building modules 40/57 modules 17 active ...ockjsSuccess! Compiled 1 module.et.js webpacker_1 | Successfully generated /tmp/117813-1-1lm55js.r9mkgzm2t9.js webpacker_1 | 92% chunk assetHash: 0fba3c9f83d08f099017 webpacker_1 | Version: webpack 3.5.6 webpacker_1 | Time: 3059ms webpacker_1 | Asset Size Chunks Chunk Names webpacker_1 | hello_elm-a49ad0a3ed48411416eb.js 1.87 MB 0 [emitted] [big] hello_elm webpacker_1 | Main-f0a26307d1db1882a32b.js 1.87 MB 1 [emitted] [big] Main webpacker_1 | application-963cd78993444428f61c.js 896 kB 2 [emitted] [big] application webpacker_1 | manifest.json 182 bytes [emitted] webpacker_1 | [34] (webpack)-dev-server/client?http://localhost:3035 5.83 kB {0} {1} {2} [built] webpacker_1 | [35] ./node_modules/url/url.js 23.3 kB {0} {1} {2} [built] webpacker_1 | [41] ./node_modules/strip-ansi/index.js 161 bytes {0} {1} {2} [built] webpacker_1 | [43] ./node_modules/loglevel/lib/loglevel.js 7.74 kB {0} {1} {2} [built] webpacker_1 | [44] (webpack)-dev-server/client/socket.js 856 bytes {0} {1} {2} [built] webpacker_1 | [45] ./node_modules/sockjs-client/lib/entry.js 244 bytes {0} {1} {2} [built] webpacker_1 | [77] (webpack)-dev-server/client/overlay.js 3.6 kB {0} {1} {2} [built] webpacker_1 | [82] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} {1} {2} [built] webpacker_1 | [84] (webpack)/hot/emitter.js 77 bytes {0} {1} {2} [built] webpacker_1 | [86] ./app/javascript/packs/Main.elm 335 kB {0} {1} [built] webpacker_1 | [87] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/application.js 40 bytes {2} [built] webpacker_1 | [88] ./app/javascript/packs/application.js 515 bytes {2} [built] webpacker_1 | [89] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/hello_elm.js 40 bytes {0} [built] webpacker_1 | [90] ./app/javascript/packs/hello_elm.js 396 bytes {0} [built] webpacker_1 | [91] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/Main.elm 40 bytes {1} [built] webpacker_1 | + 77 hidden modules webpacker_1 | webpack: Compiled successfully. webpacker_1 | Project is running at http://localhost:3035/ webpacker_1 | webpack output is served from /packs/ webpacker_1 | Content not from webpack is served from /app/public/packs webpacker_1 | 404s will fallback to /index.html webpacker_1 | Running /app/node_modules/.bin/elm-make /app/app/javascript/packs/Main.elm --yes --warn --debug --output /tmp/117813-1-1pnkvvy.kvz0s2x1or.js webpacker_1 | 14% buiSuccess! Compiled 1 module. 17 active ...s-client/lib/transport/xdr-polling.js webpacker_1 | Successfully generated /tmp/117813-1-1pnkvvy.kvz0s2x1or.js webpacker_1 | webpack 92% chunk assetHash: 0fba3c9f83d08f099017 webpacker_1 | Version: webpack 3.5.6 webpacker_1 | Time: 3705ms webpacker_1 | Asset Size Chunks Chunk Names webpacker_1 | hello_elm-a49ad0a3ed48411416eb.js 1.87 MB 0 [emitted] [big] hello_elm webpacker_1 | Main-f0a26307d1db1882a32b.js 1.87 MB 1 [emitted] [big] Main webpacker_1 | application-963cd78993444428f61c.js 896 kB 2 [emitted] [big] application webpacker_1 | manifest.json 182 bytes [emitted] webpacker_1 | [34] (webpack)-dev-server/client?http://localhost:3035 5.83 kB {0} {1} {2} [built] webpacker_1 | [35] ./node_modules/url/url.js 23.3 kB {0} {1} {2} [built] webpacker_1 | [41] ./node_modules/strip-ansi/index.js 161 bytes {0} {1} {2} [built] webpacker_1 | [43] ./node_modules/loglevel/lib/loglevel.js 7.74 kB {0} {1} {2} [built] webpacker_1 | [44] (webpack)-dev-server/client/socket.js 856 bytes {0} {1} {2} [built] webpacker_1 | [45] ./node_modules/sockjs-client/lib/entry.js 244 bytes {0} {1} {2} [built] webpacker_1 | [77] (webpack)-dev-server/client/overlay.js 3.6 kB {0} {1} {2} [built] webpacker_1 | [82] (webpack)/hot nonrecursive ^\.\/log$ 170 bytes {0} {1} {2} [built] webpacker_1 | [84] (webpack)/hot/emitter.js 77 bytes {0} {1} {2} [built] webpacker_1 | [86] ./app/javascript/packs/Main.elm 335 kB {0} {1} [built] webpacker_1 | [87] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/application.js 40 bytes {2} [built] webpacker_1 | [88] ./app/javascript/packs/application.js 515 bytes {2} [built] webpacker_1 | [89] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/hello_elm.js 40 bytes {0} [built] webpacker_1 | [90] ./app/javascript/packs/hello_elm.js 396 bytes {0} [built] webpacker_1 | [91] multi (webpack)-dev-server/client?http://localhost:3035 ./app/javascript/packs/Main.elm 40 bytes {1} [built] webpacker_1 | + 77 hidden modules webpacker_1 | webpack: Compiled successfully. app_1 | DEPRECATION WARNING: ActionView::Template::Handlers::Erubis is deprecated and will be removed from Rails 5.2. Switch to ActionView::Template::Handlers::ERB::Erubi instead. (called from require at /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib/bundler/runtime.rb:82) app_1 | W, [2017-09-13T15:44:45.382875 #1] WARN -- : [SKYLIGHT] [1.3.1] Running Skylight in development mode. No data will be reported until you deploy your app. app_1 | (To disable this message for all local apps, run `skylight disable_dev_warning`.) app_1 | /app/app/models/test_attempts/context_test_attempt.rb:86: warning: circular argument reference - ability_estimate app_1 | => Booting Puma app_1 | => Rails 5.1.4 application starting in development app_1 | => Run `rails server -h` for more startup options app_1 | Puma starting in single mode... app_1 | * Version 3.10.0 (ruby 2.4.1-p111), codename: Russell's Teapot app_1 | * Min threads: 5, max threads: 5 app_1 | * Environment: development app_1 | * Listening on tcp://0.0.0.0:3000 app_1 | Use Ctrl-C to stop app_1 | Started GET "/" for 172.18.0.1 at 2017-09-13 15:44:56 +0000 app_1 | Cannot render console from 172.18.0.1! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255 app_1 | (0.6ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC app_1 | Processing by PagesController#index as HTML app_1 | (0.3ms) BEGIN app_1 | (0.3ms) ROLLBACK app_1 | Rendering layouts/application.html.haml app_1 | Rendering pages/index.html.haml within layouts/application app_1 | Rendered pages/index.html.haml within layouts/application (78.9ms) app_1 | Rendered shared/_head.html.haml (37895.2ms) app_1 | Rendered shared/_flash.html.haml (1.0ms) app_1 | Rendered shared/_header.html.haml (39.9ms) app_1 | Rendered shared/_footer.html.haml (16.0ms) app_1 | Rendered shared/_analytics.html.haml (0.9ms) app_1 | Rendered layouts/application.html.haml (38089.9ms) app_1 | Completed 200 OK in 38677ms (Views: 38152.2ms | ActiveRecord: 7.0ms) app_1 | app_1 | app_1 | 2017-09-13 15:45:35 +0000: Rack app error handling request { GET / } app_1 | #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035> app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp' app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?' app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response' app_1 | /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call' app_1 | /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread' app_1 | 2017-09-13 15:45:35 +0000: Rack app error handling request { GET /favicon.ico } app_1 | #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035> app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp' app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?' app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response' app_1 | /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call' app_1 | /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread' app_1 | Started GET "/" for 172.18.0.1 at 2017-09-13 15:45:51 +0000 app_1 | Cannot render console from 172.18.0.1! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255 app_1 | Processing by PagesController#index as HTML app_1 | (0.2ms) BEGIN app_1 | (0.2ms) ROLLBACK app_1 | Rendering layouts/application.html.haml app_1 | Rendering pages/index.html.haml within layouts/application app_1 | Rendered shared/_locked_flash.html.haml (1.2ms) app_1 | Rendered pages/index.html.haml within layouts/application (15.5ms) app_1 | Rendered shared/_head.html.haml (164.7ms) app_1 | Rendered shared/_flash.html.haml (1.2ms) app_1 | Rendered shared/_header.html.haml (20.2ms) app_1 | Rendered shared/_footer.html.haml (8.1ms) app_1 | Rendered shared/_analytics.html.haml (1.0ms) app_1 | Rendered layouts/application.html.haml (253.2ms) app_1 | Completed 200 OK in 294ms (Views: 269.1ms | ActiveRecord: 5.4ms) app_1 | app_1 | app_1 | 2017-09-13 15:45:51 +0000: Rack app error handling request { GET / } app_1 | #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035> app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp' app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?' app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response' app_1 | /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call' app_1 | /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread' app_1 | 2017-09-13 15:45:51 +0000: Rack app error handling request { GET /favicon.ico } app_1 | #<Errno::EADDRNOTAVAIL: Cannot assign requested address - connect(2) for [::1]:3035> app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach' app_1 | /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp' app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?' app_1 | /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response' app_1 | /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call' app_1 | /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run' app_1 | /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread' Here's the error output displayed on the actual webpage itself: Puma caught this error: Cannot assign requested address - connect(2) for [::1]:3035 (Errno::EADDRNOTAVAIL) /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `__connect_nonblock' /usr/local/lib/ruby/2.4.0/socket.rb:1198:in `connect_nonblock' /usr/local/lib/ruby/2.4.0/socket.rb:56:in `connect_internal' /usr/local/lib/ruby/2.4.0/socket.rb:137:in `connect' /usr/local/lib/ruby/2.4.0/socket.rb:627:in `block in tcp' /usr/local/lib/ruby/2.4.0/socket.rb:227:in `each' /usr/local/lib/ruby/2.4.0/socket.rb:227:in `foreach' /usr/local/lib/ruby/2.4.0/socket.rb:617:in `tcp' /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server.rb:9:in `running?' /usr/local/bundle/gems/webpacker-3.0.1/lib/webpacker/dev_server_proxy.rb:7:in `rewrite_response' /usr/local/bundle/gems/rack-proxy-0.6.2/lib/rack/proxy.rb:57:in `call' /usr/local/bundle/gems/railties-5.1.4/lib/rails/engine.rb:522:in `call' /usr/local/bundle/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call' /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request' /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client' /usr/local/bundle/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run' /usr/local/bundle/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'
You need set the --listen-host value that gets passed to webpack-dev-server. You can achieve this by editing the file config/webpacker.yml and changing the development:dev_server:host: value from localhost to 0.0.0.0, that should solve the problem.