|
1 | | -# [Choice] Ruby version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.0, 2, 2.7, 2.6, 3-bullseye, 3.0-bullseye, 2-bullseye, 2.7-bullseye, 2.6-bullseye, 3-buster, 3.0-buster, 2-buster, 2.7-buster, 2.6-buster |
2 | | -ARG VARIANT=2-bullseye |
3 | | -FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT} |
4 | | - |
5 | | -# Install Rails |
6 | | -RUN gem install rails webdrivers |
7 | | - |
8 | | -# Default value to allow debug server to serve content over GitHub Codespace's port forwarding service |
9 | | -# The value is a comma-separated list of allowed domains |
10 | | -ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev" |
11 | | - |
12 | | -# [Choice] Node.js version: lts/*, 16, 14, 12, 10 |
13 | | -ARG NODE_VERSION="lts/*" |
14 | | -RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1" |
15 | | - |
16 | | -# [Optional] Uncomment this section to install additional OS packages. |
17 | | -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ |
18 | | -# && apt-get -y install --no-install-recommends <your-package-list-here> |
19 | | - |
20 | | -# [Optional] Uncomment this line to install additional gems. |
21 | | -# RUN gem install <your-gem-names-here> |
22 | | - |
23 | | -# [Optional] Uncomment this line to install global node packages. |
24 | | -# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1 |
25 | | - |
26 | | -RUN apt-get update |
27 | | -RUN apt-get install -y imagemagick git-flow |
28 | | - |
29 | | -WORKDIR /usr/local |
| 1 | +ARG RUBY_VERSION=3.2 |
30 | 2 | ARG REDMINE_VERSION=master |
31 | | -RUN git clone https://github.com/redmine/redmine.git -b ${REDMINE_VERSION} |
32 | | -WORKDIR /usr/local/redmine |
33 | | -COPY .devcontainer/database.yml /usr/local/redmine/config/database.yml |
34 | | - |
35 | | -RUN rm -rf .git |
36 | | -# RUN echo "gem 'ruby-debug-ide'" >> Gemfile |
37 | | -RUN echo "gem 'debug'" >> Gemfile |
38 | | -RUN echo "gem 'rufo'" >> Gemfile |
39 | | -ENV DB=sqlite3 |
40 | | -RUN bundle install |
41 | | -RUN bundle exec rake db:migrate |
42 | | -RUN bundle exec rake db:migrate RAILS_ENV=test |
43 | | -RUN bundle exec rake test:scm:setup:all |
44 | | -COPY .devcontainer/launch.json /usr/local/redmine/.vscode/launch.json |
45 | | -RUN chown -R vscode . |
46 | | -RUN sed -i "s/^end/ config.hosts.clear\nend/" config/environments/development.rb |
47 | | - |
| 3 | +FROM haru/redmine_devcontainer:${REDMINE_VERSION}-ruby${RUBY_VERSION} |
48 | 4 | COPY .devcontainer/post-create.sh /post-create.sh |
49 | 5 |
|
50 | | -WORKDIR /workspaces |
| 6 | + |
0 commit comments