Skip to content

Commit

Permalink
Merge pull request #2898 from znz/update-devcontainer
Browse files Browse the repository at this point in the history
devcontainerの設定を更新
  • Loading branch information
znz authored Jul 4, 2024
2 parents 36e408a + fce490f commit e2999b7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
services:
rurema:
command: /bin/sh -c "while sleep 1000; do :; done"
12 changes: 8 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"dockerComposeFile": ["../docker-compose.yml", "./docker-compose.yml"],
"forwardPorts": [8080],
"name": "rurema doctree",
"service": "rurema"
"name": "rurema/doctree",
"dockerComposeFile": [
"../compose.yaml",
"compose.yaml"
],
"service": "rurema",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"forwardPorts": [8080]
}
4 changes: 0 additions & 4 deletions .devcontainer/docker-compose.yml

This file was deleted.

12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM rubylang/ruby:2.7.2-bionic
RUN install -o 1000 -g 1000 -m 755 -d /rurema /rurema/doctree
WORKDIR /rurema/doctree
USER 1000:1000
RUN git clone --depth=1 https://github.com/rurema/bitclust ../bitclust
COPY Gemfile .
RUN bundle install --path=.bundle
FROM ruby:3.3.3-bookworm
RUN useradd rurema --create-home --shell /bin/bash
USER rurema:rurema
ENV BUNDLE_AUTO_INSTALL true
WORKDIR /workspaces/doctree
ENTRYPOINT ["bundle", "exec"]
CMD ["rake"]
9 changes: 3 additions & 6 deletions docker-compose.yml → compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,15 @@
# docker compose run --rm rurema rake -T
# docker compose run --rm rurema rake generate:2.7.0 statichtml:2.7.0
# open _site/2.7.0/index.html instead of /tmp/html/2.7.0/index.html
version: "3.8"
services:
rurema:
build: .
volumes:
- "./_site/:/tmp/html/"
- "./Gemfile:/rurema/doctree/Gemfile"
- "./Rakefile:/rurema/doctree/Rakefile"
- "./refm:/rurema/doctree/refm"
- ..:/workspaces:cached
- "./_site:/tmp/html/"
web:
image: nginx
ports:
- "8080:80"
volumes:
- "./_site/:/usr/share/nginx/html:ro"
- "./_site:/usr/share/nginx/html:ro"

0 comments on commit e2999b7

Please sign in to comment.