Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add docker image #6

Merged
merged 1 commit into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "Textbook Development",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"context": "..",
"dockerfile": "../Dockerfile.devel"
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [4000],

// Uncomment the next line to run commands after the container is created.
"postCreateCommand": "cat /etc/os-release"

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"
}
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
22 changes: 22 additions & 0 deletions Dockerfile.devel
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ruby:2.7.7
ENV NODE_VERSION=20.11.0
RUN apt update && apt install -y curl build-essential
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
ENV NVM_DIR=/root/.nvm
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
RUN gem install bundler:2.3.7
COPY Gemfile .
COPY Gemfile.lock .
COPY Makefile .

RUN mkdir cs357-rtd-theme
COPY cs357-rtd-theme/package.json cs357-rtd-theme/
COPY cs357-rtd-theme/yarn.lock cs357-rtd-theme/
COPY cs357-rtd-theme/Gemfile cs357-rtd-theme/
COPY cs357-rtd-theme/jekyll-rtd-theme.gemspec cs357-rtd-theme/
COPY cs357-rtd-theme/Makefile cs357-rtd-theme/

RUN make install
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,15 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_portile2 (2.8.5)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.21.2)
nokogiri (1.13.10)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
nokogiri (1.13.10-arm64-darwin)
racc (~> 1.4)
nokogiri (1.13.10-x86_64-linux)
Expand Down Expand Up @@ -263,6 +267,7 @@ GEM
zeitwerk (2.6.12)

PLATFORMS
ruby
universal-darwin-23
x86_64-linux

Expand Down