現在、DockerでRails+nginxで開発環境を構築しようとしているのですが、
デフォルトのファイルが生成されません。
もしよろしければご教授いただけると助かります。
どうぞよろしくおねがいします。
実行コマンドはこちら
docker run --rm rails-app rails new . -G --force --database=mysql --skip-bundle
実行結果はこちら
log
1$ docker run --rm rails-app rails new . -G --force --database=mysql --skip-bundle 2 exist 3 create README.md 4 create Rakefile 5 create .ruby-version 6 create config.ru 7 force Gemfile 8 create package.json 9 create app 10 create app/assets/config/manifest.js 11 create app/assets/javascripts/application.js 12 create app/assets/javascripts/cable.js 13 create app/assets/stylesheets/application.css 14 create app/channels/application_cable/channel.rb 15 create app/channels/application_cable/connection.rb 16 create app/controllers/application_controller.rb 17 create app/helpers/application_helper.rb 18 create app/jobs/application_job.rb 19 create app/mailers/application_mailer.rb 20 create app/models/application_record.rb 21 create app/views/layouts/application.html.erb 22 create app/views/layouts/mailer.html.erb 23 create app/views/layouts/mailer.text.erb 24 create app/assets/images/.keep 25 create app/assets/javascripts/channels 26 create app/assets/javascripts/channels/.keep 27 create app/controllers/concerns/.keep 28 create app/models/concerns/.keep 29 create bin 30 create bin/bundle 31 create bin/rails 32 create bin/rake 33 create bin/setup 34 create bin/update 35 create bin/yarn 36 create config 37 create config/routes.rb 38 create config/application.rb 39 create config/environment.rb 40 create config/cable.yml 41 create config/puma.rb 42 create config/spring.rb 43 create config/storage.yml 44 create config/environments 45 create config/environments/development.rb 46 create config/environments/production.rb 47 create config/environments/test.rb 48 create config/initializers 49 create config/initializers/application_controller_renderer.rb 50 create config/initializers/assets.rb 51 create config/initializers/backtrace_silencers.rb 52 create config/initializers/content_security_policy.rb 53 create config/initializers/cookies_serializer.rb 54 create config/initializers/cors.rb 55 create config/initializers/filter_parameter_logging.rb 56 create config/initializers/inflections.rb 57 create config/initializers/mime_types.rb 58 create config/initializers/new_framework_defaults_5_2.rb 59 create config/initializers/wrap_parameters.rb 60 create config/locales 61 create config/locales/en.yml 62 create config/master.key 63/usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/message_encryptor.rb:175: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call 64/usr/local/bundle/gems/activesupport-5.2.4.3/lib/active_support/messages/metadata.rb:17: warning: The called method `wrap' is defined here 65 create config/boot.rb 66 create config/database.yml 67 create db 68 create db/seeds.rb 69 create lib 70 create lib/tasks 71 create lib/tasks/.keep 72 create lib/assets 73 create lib/assets/.keep 74 create log 75 create log/.keep 76 create public 77 create public/404.html 78 create public/422.html 79 create public/500.html 80 create public/apple-touch-icon-precomposed.png 81 create public/apple-touch-icon.png 82 create public/favicon.ico 83 create public/robots.txt 84 create tmp 85 create tmp/.keep 86 create tmp/pids 87 create tmp/pids/.keep 88 create tmp/cache 89 create tmp/cache/assets 90 create vendor 91 create vendor/.keep 92 create test/fixtures 93 create test/fixtures/.keep 94 create test/fixtures/files 95 create test/fixtures/files/.keep 96 create test/controllers 97 create test/controllers/.keep 98 create test/mailers 99 create test/mailers/.keep 100 create test/models 101 create test/models/.keep 102 create test/helpers 103 create test/helpers/.keep 104 create test/integration 105 create test/integration/.keep 106 create test/test_helper.rb 107 create test/system 108 create test/system/.keep 109 create test/application_system_test_case.rb 110 create storage 111 create storage/.keep 112 create tmp/storage 113 create tmp/storage/.keep 114 remove config/initializers/cors.rb 115 remove config/initializers/new_framework_defaults_5_2.rb
Dockerfileがこちらです
FROM ruby:2.7.1 # install tools RUN apt-get update \ && apt-get install -y --no-install-recommends \ apt-transport-https \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # install yarn 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 \ && apt-get -y install yarn \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* RUN yarn add --dev webpack-dev-server # install node 10.x RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - RUN apt-get install -y nodejs \ && apt-get clean RUN mkdir /myapp WORKDIR /myapp ADD Gemfile /myapp/Gemfile ADD Gemfile.lock /myapp/Gemfile.lock RUN bundle install COPY . /myapp
k8s yaml
--- # コンテナ apiVersion: apps/v1 kind: Deployment metadata: name: mybotapp spec: replicas: 1 selector: matchLabels: app: mybotapp template: metadata: labels: app: mybotapp spec: containers: - name: rails-container image: rails-app:latest imagePullPolicy: Never volumeMounts: - mountPath: /app/tmp/sockets name: web-sock - mountPath: /app name: src command: ["/bin/sh","-c"] args: ["bundle exec pumactl start"] env: - name: TZ value: Asia/Tokyo - name: nginx-container image: nginx:1.13.3 imagePullPolicy: Never ports: - name: http-server containerPort: 80 - name: https-server containerPort: 443 volumeMounts: - mountPath: /app/tmp/sockets name: web-sock - mountPath: /maintenance name: nginx-maintenance-volume #- mountPath: /etc/nginx/params # readOnly: true # name: nginx-params-config imagePullSecrets: - name: ap-northeast-1-ecr-registry volumes: - name: web-assets emptyDir: {} - name: web-sock emptyDir: {} - name: nginx-maintenance-volume hostPath: # 作業者にあわせてパスを変更 path: $PWD/myapp/public type: Directory #- name: nginx-params-config # configMap: # name: nginx-params-config # items: # - key: ip-allow # path: ip-allow - name: src hostPath: # 作業者にあわせてパスを変更 path: "$PWD/myapp" type: DirectoryOrCreate コード
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/07/25 14:19
2020/07/25 15:24
2020/07/25 15:48
2020/07/25 16:04
2020/07/26 01:16
2020/07/26 02:22
2020/07/26 08:49
2020/07/26 13:05
2020/07/26 13:15