Я только начал играть с Docker, все движется, пока я не попытался получить доступ к странице моего приложения super basi c. Я получил это:
web_1 | [Webpacker] Compiling...
web_1 | [Webpacker] Compilation failed:
web_1 | ERROR: [Errno 21] Is a directory: 'bin'
web_1 | CRITICAL:root:Traceback (most recent call last):
web_1 | File "/usr/lib/python2.7/dist-packages/cliapp/app.py", line 182, in _run
web_1 | self.settings.load_configs()
web_1 | File "/usr/lib/python2.7/dist-packages/cliapp/settings.py", line 829, in load_configs
web_1 | self._read_ini(pathname, f)
web_1 | File "/usr/lib/python2.7/dist-packages/cliapp/settings.py", line 838, in _read_ini
web_1 | cp.readfp(f)
web_1 | File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp
web_1 | self._read(fp, filename)
web_1 | File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
web_1 | raise MissingSectionHeaderError(fpname, lineno, line)
web_1 | MissingSectionHeaderError: File contains no section headers.
web_1 | file: /usr/src/app/config/webpack/development.js, line: 1
web_1 | "process.env.NODE_ENV = process.env.NODE_ENV || 'development'\n"
web_1 |
web_1 | Traceback (most recent call last):
web_1 | File "/usr/lib/python2.7/dist-packages/cliapp/app.py", line 182, in _run
web_1 | self.settings.load_configs()
web_1 | File "/usr/lib/python2.7/dist-packages/cliapp/settings.py", line 829, in load_configs
web_1 | self._read_ini(pathname, f)
web_1 | File "/usr/lib/python2.7/dist-packages/cliapp/settings.py", line 838, in _read_ini
web_1 | cp.readfp(f)
web_1 | File "/usr/lib/python2.7/ConfigParser.py", line 324, in readfp
web_1 | self._read(fp, filename)
web_1 | File "/usr/lib/python2.7/ConfigParser.py", line 512, in _read
web_1 | raise MissingSectionHeaderError(fpname, lineno, line)
web_1 | MissingSectionHeaderError: File contains no section headers.
web_1 | file: /usr/src/app/config/webpack/development.js, line: 1
web_1 | "process.env.NODE_ENV = process.env.NODE_ENV || 'development'\n"
Я впервые вижу эту ошибку.
Вот мой docker -compose.yml
version: '3'
services:
web:
build: .
ports:
- "3000:3000"
volumes:
- .:/usr/src/app
Вот мой Dockerfile:
FROM ruby:2.6
LABEL maintainer="ejvalmores@gmail.com"
RUN apt-get update -yqq && apt-get install -yqq --no-install-recommends \
nodejs
RUN apt-get install -yqq yarn
COPY Gemfile* /usr/src/app/
WORKDIR /usr/src/app
RUN bundle install
COPY . /usr/src/app
CMD ["bin/rails", "s", "-b", "0.0.0.0"]
А вот мой Gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.6.5'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.2', '>= 6.0.2.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 4.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Active Storage variant
# gem 'image_processing', '~> 1.2'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers
gem 'webdrivers'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'redis'
Кто-нибудь сталкивался с этой ошибкой? Пожалуйста помоги. Спасибо!