-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c8448a9
commit a0740c1
Showing
7 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG VARIANT=bullseye | ||
|
||
FROM mcr.microsoft.com/vscode/devcontainers/base:${VARIANT} | ||
|
||
RUN apt-get update && \ | ||
apt-get -y install --no-install-recommends \ | ||
build-essential gnupg2 tar git zsh libssl-dev zlib1g-dev libyaml-dev curl libreadline-dev \ | ||
postgresql-client libpq-dev \ | ||
imagemagick libjpeg-dev libpng-dev libtiff-dev libwebp-dev libvips \ | ||
tzdata \ | ||
tmux \ | ||
vim | ||
|
||
# Install rbenv and ruby | ||
USER vscode | ||
|
||
ARG RUBY_VERSION="2.6.8" | ||
RUN git clone https://github.com/rbenv/rbenv.git /home/vscode/.rbenv \ | ||
&& echo '[ -f "/home/vscode/.rbenv/bin/rbenv" ] && eval "$(rbenv init - bash)" # rbenv' >> /home/vscode/.zshrc \ | ||
&& echo '[ -f "/home/vscode/.rbenv/bin/rbenv" ] && eval "$(rbenv init - bash)" # rbenv' >> /home/vscode/.bashrc \ | ||
&& echo 'export PATH="/home/vscode/.rbenv/bin:$PATH"' >> /home/vscode/.zshrc \ | ||
&& echo 'export PATH="/home/vscode/.rbenv/bin:$PATH"' >> /home/vscode/.bashrc \ | ||
&& mkdir -p /home/vscode/.rbenv/versions \ | ||
&& mkdir -p /home/vscode/.rbenv/plugins \ | ||
&& git clone https://github.com/rbenv/ruby-build.git /home/vscode/.rbenv/plugins/ruby-build | ||
|
||
ENV PATH "/home/vscode/.rbenv/bin/:HOME/.rbenv/shims/:$PATH" | ||
|
||
RUN rbenv install $RUBY_VERSION && \ | ||
rbenv global $RUBY_VERSION && \ | ||
rbenv versions | ||
|
||
COPY .devcontainer/welcome.txt /usr/local/etc/vscode-dev-containers/first-run-notice.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby-rails-postgres | ||
{ | ||
"name": "Blog DevContainer", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"context": ".." | ||
}, | ||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", | ||
"features": { | ||
"ghcr.io/devcontainers/features/node:1": { | ||
"version": "9" | ||
} | ||
}, | ||
"remoteEnv": { | ||
"GIT_EDITOR": "code --wait" | ||
}, | ||
"onCreateCommand": ".devcontainer/onCreateCommand.sh", | ||
"customizations": { | ||
"vscode": { | ||
// Set *default* container specific settings.json values on container create. | ||
"extensions": [ | ||
"GitHub.github-vscode-theme", | ||
"eamodio.gitlens", | ||
], | ||
"rubyLsp.enableExperimentalFeatures": true | ||
} | ||
}, | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [ | ||
4000 | ||
], | ||
"portsAttributes": { | ||
"4000": { | ||
"label": "web", | ||
"onAutoForward": "notify", | ||
"requireLocalPort": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "Updating RubyGems..." | ||
gem update --system -N | ||
|
||
echo "Installing dependencies..." | ||
bundle | ||
|
||
echo "Done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
👋 Welcome to "Blog"! | ||
|
||
🛠️ Your environment is fully setup with all the required software. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.4.5 | ||
2.6.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ruby 2.6.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env sh | ||
|
||
exec bundle exec jekyll serve --config _config.yml,_config-dev.yml |