forked from konveyor/tackle2-ui
-
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.
Signed-off-by: Scott J Dickerson <[email protected]>
- Loading branch information
Showing
5 changed files
with
90 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 @@ | ||
storage/ |
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 @@ | ||
FROM verdaccio/verdaccio:5 | ||
|
||
ADD config.yaml /verdaccio/conf/config.yaml | ||
|
||
USER root | ||
RUN npm install --global verdaccio-static-token \ | ||
&& npm install --global verdaccio-auth-memory | ||
|
||
USER $VERDACCIO_USER_UID |
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,20 @@ | ||
#!/bin/bash -xe | ||
|
||
# | ||
# Build the project's container image using the npm caching proxy that | ||
# has been setup with run.sh | ||
# | ||
|
||
# cd to project root | ||
[[ -e Dockerfile ]] || cd ../.. | ||
|
||
# TODO: Grab the current project config and replace after the run | ||
npm config set registry "http://host.containers.internal:4873" --location=project | ||
# --env "npm_config_registry=http://host.containers.internal:4873" \ | ||
|
||
podman build \ | ||
--pull \ | ||
-t localhost/tackle2-ui:image1 \ | ||
. | ||
|
||
npm config delete registry --location=project |
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,41 @@ | ||
# See https://github.com/verdaccio/verdaccio/blob/5.x/conf/docker.yaml | ||
# https://verdaccio.org/docs/configuration | ||
|
||
storage: /verdaccio/storage/data | ||
plugins: /verdaccio/plugins | ||
|
||
web: | ||
title: Verdaccio npm cache | ||
login: false | ||
|
||
auth: | ||
htpasswd: | ||
file: /verdaccio/storage/htpasswd | ||
algorithm: bcrypt | ||
max_users: -1 | ||
|
||
uplinks: | ||
npmjs: | ||
url: https://registry.npmjs.org/ | ||
|
||
packages: | ||
"@*/*": | ||
access: $all | ||
publish: $authenticated | ||
unpublish: $authenticated | ||
proxy: npmjs | ||
|
||
"**": | ||
access: $all | ||
publish: $authenticated | ||
unpublish: $authenticated | ||
proxy: npmjs | ||
|
||
server: | ||
keepAliveTimeout: 60 | ||
|
||
middlewares: | ||
audit: | ||
enabled: true | ||
|
||
log: { type: stdout, format: pretty, level: info } |
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,19 @@ | ||
#!/bin/bash -xe | ||
|
||
# | ||
# userns=keep-id with the uid and gid settings will have podman map | ||
# the uid and gid of the user who runs the container to those uid and | ||
# gid internally so files created on the host belong to the user who | ||
# started the container! | ||
# | ||
podman run \ | ||
-it \ | ||
--rm \ | ||
--name npm-mirror \ | ||
--userns=keep-id:uid=10001,gid=65533 \ | ||
-p 4873:4873 \ | ||
-v ./config:/verdaccio/conf:Z \ | ||
-v ./storage:/verdaccio/storage:Z,U \ | ||
verdaccio/verdaccio:5 \ | ||
$@ | ||
|