mirror of
https://github.com/gurucomputing/headscale-ui.git
synced 2026-01-23 02:34:43 +00:00
added jq to image, moved build image to alpine
This commit is contained in:
parent
9db27aaa28
commit
022b6855a8
2 changed files with 11 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# arguments
|
||||
ARG VERSION="master"
|
||||
|
||||
FROM node:latest AS build
|
||||
FROM node:current-alpine AS build
|
||||
|
||||
#environment variables
|
||||
ENV PROJECT_NAME="headscale-ui"
|
||||
|
|
@ -24,6 +24,10 @@ RUN chmod -R 755 scripts
|
|||
# Build the image. This build runs as root
|
||||
RUN /staging/scripts/1-image-build.sh
|
||||
|
||||
#####
|
||||
## Second Image
|
||||
#####
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
#environment variables
|
||||
|
|
|
|||
|
|
@ -4,12 +4,17 @@ set -x
|
|||
#clone the project
|
||||
git clone ${PROJECT_URL} ${PROJECT_NAME}
|
||||
|
||||
# add dependencies
|
||||
# jq for parsing version information
|
||||
apk add --no-cache jq
|
||||
|
||||
# install the project
|
||||
cd ${PROJECT_NAME}
|
||||
npm install
|
||||
|
||||
# inject the version number
|
||||
sed -i 's/insert-version/${{ steps.gathervars.outputs.VERSION }}/g' ./src/routes/settings.html.svelte
|
||||
VERSION=$(jq -r '.version' package.json)
|
||||
sed -i "s/insert-version/${VERSION}/g" ./src/routes/settings.html.svelte
|
||||
|
||||
# build the project
|
||||
npm run build
|
||||
Loading…
Add table
Add a link
Reference in a new issue