mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Add podman support
This commit is contained in:
		@@ -10,6 +10,9 @@ RUN npm run build
 | 
			
		||||
 | 
			
		||||
FROM node:stretch-slim
 | 
			
		||||
 | 
			
		||||
RUN useradd -ms /bin/bash appuser
 | 
			
		||||
USER appuser
 | 
			
		||||
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
 | 
			
		||||
COPY --from=builder --chown=appuser:appuser /home/node/node_modules node_modules
 | 
			
		||||
							
								
								
									
										13
									
								
								container-build.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								container-build.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
VERSION=$(grep -oE "\"version\": \"(\w*.\w*.\w*.\w*.\w*.)" package.json | cut -d\" -f4)
 | 
			
		||||
 | 
			
		||||
CONTAINER_ENGINE=$1
 | 
			
		||||
if [ -z $CONTAINER_ENGINE ]; then
 | 
			
		||||
  CONTAINER_ENGINE=docker
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo using $CONTAINER_ENGINE container engine...
 | 
			
		||||
 | 
			
		||||
$CONTAINER_ENGINE build --rm --no-cache \
 | 
			
		||||
  --build-arg BUILD_DATE="$(date +"%Y-%m-%dT%H:%M:%SZ")" \
 | 
			
		||||
  --file Containerfile \
 | 
			
		||||
  --tag sparkle-guide:$VERSION .
 | 
			
		||||
							
								
								
									
										11
									
								
								container-run.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										11
									
								
								container-run.sh
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
VERSION=$(grep -oE "\"version\": \"(\w*.\w*.\w*.\w*.\w*.)" package.json | cut -d\" -f4)
 | 
			
		||||
 | 
			
		||||
CONTAINER_ENGINE=$1
 | 
			
		||||
if [ -z $CONTAINER_ENGINE ]; then
 | 
			
		||||
  CONTAINER_ENGINE=docker
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
echo using $CONTAINER_ENGINE container engine...
 | 
			
		||||
 | 
			
		||||
$CONTAINER_ENGINE run -p 1880:1880 -v "$(pwd)"/data/:/root/.node-red/ sparkle-guide:$VERSION &
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
VERSION=$(grep -oE "\"version\": \"(\w*.\w*.\w*.\w*.\w*.)" package.json | cut -d\" -f4)
 | 
			
		||||
 | 
			
		||||
docker build --rm --no-cache \
 | 
			
		||||
  --build-arg BUILD_DATE="$(date +"%Y-%m-%dT%H:%M:%SZ")" \
 | 
			
		||||
  --file Dockerfile \
 | 
			
		||||
  --tag sparkle-guide:$VERSION .
 | 
			
		||||
@@ -1,4 +0,0 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
VERSION=$(grep -oE "\"version\": \"(\w*.\w*.\w*.\w*.\w*.)" package.json | cut -d\" -f4)
 | 
			
		||||
 | 
			
		||||
docker run -p 1880:1880 -v "$(pwd)"/data/:/root/.node-red/ sparkle-guide:$VERSION &
 | 
			
		||||
		Reference in New Issue
	
	Block a user