-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🏗✨:kick off new fish shell CentOS devcontainer #28
Fixes: #16 PR URL: #28 Reviewed-by: OpenINF Bot <[email protected]> Signed-off-by: Derek Lewis <[email protected]> Cc: Princess Irulen <[email protected]> Cc: Jorge Bucaran <[email protected]>
- Loading branch information
1 parent
444f7e3
commit aca4bb6
Showing
8 changed files
with
153 additions
and
22 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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,23 @@ | ||
# Ethically sourced from official fish-shell/fish-shell project: | ||
# See: https://github.com/fish-shell/fish-shell/blob/HEAD/Dockerfile | ||
|
||
FROM centos:centos7 | ||
|
||
# Build dependency # skipcq: DOK-W1003 | ||
RUN yum update -y \ | ||
&& yum install -y epel-release \ | ||
&& yum install -y clang cmake3 gcc-c++ make ncurses-devel \ | ||
&& yum clean all | ||
|
||
# Test dependency # skipcq: DOK-W1003 | ||
RUN yum install -y expect vim-common \ | ||
&& yum clean all | ||
|
||
# ADD . /src | ||
# WORKDIR /src | ||
|
||
# Build fish | ||
# RUN cmake3 . &&\ | ||
# make &&\ | ||
# make install | ||
|
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,10 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/openinf/docker-fisher/tree/main/templates/centos7 | ||
{ | ||
"name": "CentOS", | ||
|
||
"build": { | ||
// Path is relative to the devcontainer.json file. | ||
"dockerfile": "Dockerfile" | ||
} | ||
} |
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,26 @@ | ||
version: '3' | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
|
||
volumes: | ||
# Forwards the local Docker socket to the container. | ||
- /var/run/docker.sock:/var/run/docker-host.sock | ||
# Update this to wherever you want VS Code to mount the folder of your project | ||
- ../..:/workspaces:cached | ||
|
||
# Overrides default command so things don't shut down after the process ends. | ||
entrypoint: /usr/local/share/docker-init.sh | ||
command: sleep infinity | ||
|
||
# Uncomment the next four lines if you will use a ptrace-based debuggers like C++, Go, and Rust. | ||
# cap_add: | ||
# - SYS_PTRACE | ||
# security_opt: | ||
# - seccomp:unconfined | ||
|
||
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally. | ||
# (Adding the "ports" property to this file will not forward from a Codespace.) |
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,76 @@ | ||
#!/usr/bin/fish | ||
|
||
# If there's a .ruby-version, then run `rbenv install`. | ||
if test -e .ruby-version | ||
rbenv install --verbose | ||
end | ||
|
||
echo 'set -Ux fish_user_paths ~/.rbenv/shims/ $fish_user_paths' >> ~/.config/fish/config.fish | ||
|
||
# To squelch yellow message re: specifying how divergent branches be reconciled. | ||
echo 'git config pull.rebase true' >> ~/.config/fish/config.fish # rebase | ||
|
||
source ~/.config/fish/config.fish | ||
|
||
rbenv rehash | ||
|
||
# If there's a Gemfile, then install Bundler and run `bundle install`. | ||
if test -e Gemfile | ||
# Install Bundler. | ||
gem install bundler | ||
# Configure Bundler setting local gem install path to avoid permission errors. | ||
bundle config set --local path vendor/bundle | ||
# Install the dependencies specified in the Gemfile. | ||
bundle install | ||
# Ensure latest versions of Bundler's dependencies are installed. | ||
bundle update --bundler | ||
else | ||
# If there's no Gemfile, install Jekyll. | ||
gem install jekyll | ||
end | ||
|
||
# If there's a `.nvmrc`, then run `nvm install`. | ||
if test -e .nvmrc | ||
# Install the specified version of Node.js. | ||
nvm install | ||
end | ||
|
||
# If there's a package.json, then run `pnpm install`. | ||
if test -e package.json | ||
corepack enable | ||
corepack prepare pnpm@latest --activate | ||
pnpm install | ||
end | ||
|
||
echo 'rbenv rehash && nvm use' >> ~/.config/fish/config.fish | ||
|
||
source ~/.config/fish/config.fish | ||
|
||
# this will populate your ~/.gnupg directory with empty keyring files | ||
# it will create the ~/.gnupg directory if it does not already exist (expected) | ||
gpg --list-keys | ||
|
||
# If there's a .gnupg directory, then perform the following setup tasks. | ||
if test -e ~/.gnupg/ | ||
# Configure Git to use `gpg2`. | ||
echo 'git config --global gpg.program gpg2' >> ~/.config/fish/config.fish | ||
|
||
echo 'set -gx GPG_TTY (tty)' >> ~/.config/fish/config.fish | ||
|
||
# To fix the " gpg: WARNING: unsafe permissions on homedir | ||
# '/home/path/to/user/.gnupg' " error, make sure that the .gnupg directory and | ||
# its contents is accessibile by your user. | ||
# chown -R (whoami) ~/.gnupg/ | ||
|
||
# Also correct the permissions and access rights on the directory. | ||
# chmod 600 ~/.gnupg/* | ||
# chmod 700 ~/.gnupg | ||
|
||
echo no-autostart >> ~/.gnupg/gpg.conf | ||
|
||
# Remove an existing Unix-domain socket file for remote port forwarding before | ||
# creating a new one when gpgtunnel connection is made. | ||
# rm ~/.gnupg/S.gpg-agent | ||
|
||
printf '\n%s\n\n\t%s\n\n' 'Enable commit signing:' 'git config --global commit.gpgsign true' | ||
end |
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,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 |
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,6 @@ | ||
# Authors ordered by first contribution. | ||
# For any email changes, please make a mailmap request. | ||
# See: https://git-scm.com/docs/gitmailmap | ||
|
||
Derek Lewis <[email protected]> | ||
Princess Irulen <[email protected]> |