Skip to content

Commit 9be7a5c

Browse files
committed
feat(framework): init framework
1 parent cb234a3 commit 9be7a5c

File tree

4 files changed

+80
-3
lines changed

4 files changed

+80
-3
lines changed

.devcontainer/devcontainer.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
{
3+
"name": "nodejs-devcontainer",
4+
"build": {
5+
"dockerfile": "../Dockerfile",
6+
"context": "../",
7+
"target": "dev"
8+
},
9+
"features": {
10+
"ghcr.io/devcontainers/features/common-utils:2": {}
11+
},
12+
"runArgs": [
13+
"--userns=keep-id",
14+
"--pid=host"
15+
],
16+
"customizations": {
17+
// Configure properties specific to VS Code.
18+
"vscode": {
19+
// Add the IDs of extensions you want installed when the container is created.
20+
"extensions": [
21+
"Shopify.ruby-extensions-pack",
22+
"esbenp.prettier-vscode",
23+
"redhat.vscode-yaml",
24+
"AquaSecurityOfficial.trivy-vulnerability-scanner",
25+
"github.vscode-github-actions",
26+
"GitHub.vscode-pull-request-github",
27+
"GitHub.remotehub",
28+
"streetsidesoftware.code-spell-checker"
29+
],
30+
"settings": {
31+
"editor.tabSize": 4
32+
}
33+
}
34+
}
35+
}

.devcontainer/devtools.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# give default user permission to /usr/local
5+
chmod -R +007 /usr/local/
6+
7+
# Install Trivy repo
8+
<<EOF cat >> /etc/yum.repos.d/trivy.repo
9+
[trivy]
10+
name=Trivy repository
11+
baseurl=https://aquasecurity.github.io/trivy-repo/rpm/releases/\$basearch/
12+
gpgcheck=1
13+
enabled=1
14+
gpgkey=https://aquasecurity.github.io/trivy-repo/rpm/public.key
15+
EOF
16+
17+
dnf -y update-minimal --security --sec-severity=Important --sec-severity=Critical && \
18+
# Install trivy package
19+
dnf install trivy -y; \
20+
# Clean package cache
21+
dnf clean all

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM registry.access.redhat.com/ubi9/ubi:latest AS base
2+
3+
ENV container=oci
4+
ENV USER=default
5+
6+
USER root
7+
8+
# Check for package update
9+
RUN dnf -y update-minimal --security --sec-severity=Important --sec-severity=Critical && \
10+
# Install git, nano, ruby, rubygems-devel, gcc, make
11+
dnf install nano git ruby rubygems-devel gcc make -y; \
12+
# clear cache
13+
dnf clean all
14+
15+
# Dev target
16+
FROM base AS dev
17+
COPY .devcontainer/devtools.sh /tmp/devtools.sh
18+
RUN /tmp/devtools.sh
19+
USER default
20+
21+

_config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
title: Just the Docs Template
2-
description: A starter template for a Jeykll site using the Just the Docs theme!
1+
title: LibreHEMS
2+
description: Your goto resource for all things Home Energy Management
33
theme: just-the-docs
44

5-
url: https://just-the-docs.github.io
5+
url: https://librehems.github.io/
66

77
aux_links:
88
Template Repository: https://github.com/just-the-docs/just-the-docs-template

0 commit comments

Comments
 (0)