-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from boozallen/add-nvm-backstage-image
Added an NVM Backstage image
- Loading branch information
Showing
3 changed files
with
61 additions
and
0 deletions.
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,11 @@ | ||
# Copyright © 2023 Booz Allen Hamilton. All Rights Reserved. | ||
# This software package is licensed under the Booz Allen Public License. The license can be found in the License file or at http://boozallen.github.io/licenses/bapl | ||
|
||
FROM ghcr.io/boozallen/sdp-images/nvm:1.0.0 | ||
|
||
RUN dnf update -y --nodocs && \ | ||
dnf install -y --nodocs python3 make gcc gcc-c++ && \ | ||
dnf clean all && \ | ||
rm -rf /var/cache/* | ||
|
||
CMD ["/bin/bash"] |
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,36 @@ | ||
OWNER = boozallen | ||
REPO = sdp-images | ||
IMAGE = nvm-backstage | ||
VERSION = 1.0.2-beta | ||
|
||
REGISTRY = docker.pkg.github.com/$(OWNER)/$(REPO) | ||
TAG = $(REGISTRY)/$(IMAGE):$(VERSION) | ||
|
||
.PHONY: help Makefile | ||
.ONESHELL: push | ||
|
||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: ## Show target options | ||
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | ||
|
||
build: ## build container image | ||
docker build . -t $(TAG) | ||
|
||
push: ## builds and publishes container image | ||
$(eval user := $(shell read -p "GitHub Username: " username; echo $$username)) | ||
$(eval pass := $(shell read -s -r -p "GitHub Token: " token; echo $$token)) | ||
@echo | ||
@docker login $(REGISTRY) -u $(user) -p $(pass); | ||
make build | ||
docker tag $(TAG) $(REGISTRY)/$(IMAGE):latest | ||
docker push $(TAG) | ||
docker push $(REGISTRY)/$(IMAGE):latest | ||
|
||
info: | ||
@echo "$(TAG) -> $$(dirname $$(git ls-files --full-name Makefile))" | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
echo "Make command $@ not found" |
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,14 @@ | ||
------------- | ||
Node Version Manager + Backstage dependencies | ||
------------- | ||
|
||
A ubi8/ubi image with node version manager (nvm), python3, make, gcc, and gcc-c++ installed. Can be used to easily specify a version of nodeJs to run. | ||
|
||
|
||
To use, source nvm and follow `nvm usage <https://github.com/nvm-sh/nvm#usage>` instructions: | ||
|
||
To install the lts version of nodejs, for example, run: | ||
``` | ||
source ~/.bashrc | ||
nvm install '*/lts' | ||
``` |