社内RedmineのVerUpに伴う検証を行っていますが、
将来的なLinuxディストリビューションの移行なども見据えてDockerによる構築を行っています。
プレーンな環境の構築はできましたが、プラグインをインストールしようとするとエラーを返されてしまい、プラグインの導入が出来ないでいます。
(正確には、プラグインをGitHub等で直接DLできないものや、テーマを独自に作ったやつでGitHubに諸事情で上げられないためにLinuxにUSBマウントしてデータを持ってきたものが該当します)
ファイル権限周辺が原因だと思うのですが(GitHubからDLした分については表出せず、プラグインのインストールができたため)その回避策があれば教えていただけると幸いです。
なお、当方Dockerをやり始めたばかりの身なので、Dockerfileの書き方に難があるかも知れません。
【環境】
- OS:CentOS 7.9.2003(Core)
- Docker:Docker CE 20.10.7(stable)
- Docker Compose:1.29.2
- Redmine:公式イメージ(4.1.1-stable)
- nginx:公式イメージ
- DB:MariaDB w/ mroonga(https://github.com/kazaoki/mariadb-mroonga を使用)
Directory
1/ 2┗ srv 3 ┗ docker 4 ┠ db 5 ┃ ┠ Dockerfile 6 ┃ ┗ products_redmine 7 ┃ ┗ ・・・ 8 ┠ nginx 9 ┃ ┠ Dockerfile 10 ┃ ┗ default.conf 11 ┠ redmine 12 ┃ ┠ Dockerfile 13 ┃ ┗ products 14 ┃ ┗ data 15 ┃ ┠ config 16 ┃ ┃ ┠ configuration.yml 17 ┃ ┃ ┗ database.yml 18 ┃ ┠ files 19 ┃ ┠ log 20 ┃ ┠ plugins 21 ┃ ┃ ┗ (プラグインフォルダを配置) 22 ┃ ┗ themes 23 ┃ ┗ (テーマフォルダを配置) 24 ┗ docker-compose.yml
docker-compose.yml
yml
1/srv/docker/docker-compose.yml 2version: '3.8' 3services: 4 nginx: 5 build: ./nginx 6 container_name: nginx 7 hostname: nginx 8 ports: 9 - 80:80 10 volumes: 11 - ./nginx/default.conf:/etc/nginx/conf.d/default.conf 12 redmine: 13 build: ./redmine 14 container_name: products-redmine 15 volumes: 16 - ./redmine/products/data/config:/usr/src/redmine/config 17 - ./redmine/products/data/plugins:/usr/src/redmine/plugins 18 - ./redmine/products/data/themes:/usr/src/redmine/public/themes 19 - ./redmine/products/data/log:/usr/src/redmine/log:Z 20 environment: 21 TZ: Asia/Tokyo 22 REDMINE_DB_MYSQL: db_redmine 23 REDMINE_DB_DATABASE: db_redmine 24 REDMINE_DB_USERNAME: u_redmine 25 REDMINE_DB_PASSWORD: redmine 26 REDMINE_DB_ENCODING: utf8 27 REDMINE_PLUGINS_MIGRATE: 1 28 VIRTUAL_PORT: 3000 29 depends_on: 30 - nginx 31 - db_redmine 32 - memcached 33 ports: 34 - 3000:3000 35 restart: always 36 db_redmine: 37 build: ./db 38 container_name: products_redmine_db 39 ports: 40 - 3306:3306 41 environment: 42 TZ: Asia/Tokyo 43 MYSQL_ROOT_PASSWORD: ***** 44 MYSQL_DATABASE: db_redmine 45 MYSQL_USER: u_redmine 46 MYSQL_PASSWORD: redmine 47 volumes: 48 - ./db/products_redmine/data:/var/lib/mysql 49 command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci 50 restart: always 51 memcached: 52 image: 'sameersbn/memcached:latest' 53 container_name: memcached 54 ports: 55 - 11211:11211 56 restart: always
/srv/docker/redmine/Dockerfile
Dockerfile
1FROM redmine:latest 2COPY --chown=redmine:redmine ./products/data/config config 3COPY --chown=redmine:redmine ./products/data/plugins plugins 4COPY --chown=redmine:redmine ./products/data/themes public/themes 5COPY --chown=redmine:redmine ./products/data/files files
表出したエラーメッセージ(例)
error
1products-redmine | /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:520:in `read': Permission denied @ rb_sysopen - /usr/src/redmine/plugins/view_customize/Gemfile (Errno::EACCES) 2products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:520:in `contents' 3products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:550:in `to_s' 4products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:51:in `message' 5products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:51:in `rescue in eval_gemfile' 6products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:48:in `eval_gemfile' 7products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:12:in `evaluate' 8products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/definition.rb:34:in `build' 9products-redmine | from /usr/local/lib/ruby/2.7.0/bundler.rb:195:in `definition' 10products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/cli/check.rb:15:in `run' 11products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/cli.rb:181:in `check' 12products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 13products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' 14products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch' 15products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/cli.rb:30:in `dispatch' 16products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start' 17products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/cli.rb:24:in `start' 18products-redmine | from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:46:in `block in <top (required)>' 19products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in `with_friendly_errors' 20products-redmine | from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:34:in `<top (required)>' 21products-redmine | from /usr/local/bin/bundle:23:in `load' 22products-redmine | from /usr/local/bin/bundle:23:in `<main>' 23products-redmine | /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:520:in `read': Permission denied @ rb_sysopen - /usr/src/redmine/plugins/view_customize/Gemfile (Errno::EACCES) 24products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:520:in `contents' 25products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:550:in `to_s' 26products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:51:in `message' 27products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:51:in `rescue in eval_gemfile' 28products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/dsl.rb:48:in `eval_gemfile' 29products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/plugin.rb:81:in `block in gemfile_install' 30products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/settings.rb:124:in `temporary' 31products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/plugin.rb:76:in `gemfile_install' 32products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/cli/install.rb:61:in `run' 33products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/cli.rb:256:in `block in install' 34products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/settings.rb:124:in `temporary' 35products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/cli.rb:255:in `install' 36products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 37products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' 38products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch' 39products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/cli.rb:30:in `dispatch' 40products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start' 41products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/cli.rb:24:in `start' 42products-redmine | from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:46:in `block in <top (required)>' 43products-redmine | from /usr/local/lib/ruby/2.7.0/bundler/friendly_errors.rb:123:in `with_friendly_errors' 44products-redmine | from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.1.4/libexec/bundle:34:in `<top (required)>' 45products-redmine | from /usr/local/bin/bundle:23:in `load' 46products-redmine | from /usr/local/bin/bundle:23:in `<main>' 47products-redmine exited with code 1
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/07/06 01:08
2021/07/06 11:38