Skip to content

Instantly share code, notes, and snippets.

@ll911
Last active November 8, 2018 00:11
Show Gist options
  • Select an option

  • Save ll911/fee54eddc81972242ee9392d820de510 to your computer and use it in GitHub Desktop.

Select an option

Save ll911/fee54eddc81972242ee9392d820de510 to your computer and use it in GitHub Desktop.
node-alpine-angular-base.yaml
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
name: node-alpine-angular
spec:
lookupPolicy:
local: false
tags:
- annotations: null
from:
kind: DockerImage
name: docker-registry.default.svc:5000/dbc-konga-tools/node-alpine-angular
generation: null
importPolicy: {}
name: latest
referencePolicy:
type: ""
status:
dockerImageRepository: ""
---
apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
labels:
app: node-alpine-angular
name: node-alpine-angular
spec:
failedBuildsHistoryLimit: 5
output:
to:
kind: ImageStreamTag
name: node-alpine-angular
source:
dockerfile: |-
FROM node:8-alpine
MAINTAINER [email protected]
USER root
ENV CONTAINER_USER_ID="1001" \
CONTAINER_GROUP_ID="1001" \
BUILD_DIR=/build
WORKDIR ${BUILD_DIR}
RUN apk update \
&& apk add --no-cache rsync \
&& adduser -D -u ${CONTAINER_USER_ID} -g ${CONTAINER_GROUP_ID} -h ${BUILD_DIR} -s /bin/sh app \
&& mkdir /npm-global && chown -R ${CONTAINER_USER_ID}:${CONTAINER_USER_ID} /npm-global \
&& chown -R ${CONTAINER_USER_ID}:${CONTAINER_USER_ID} ${BUILD_DIR} && chmod -R 775 ${BUILD_DIR}
USER ${CONTAINER_USER_ID}
type: Dockerfile
strategy:
dockerStrategy:
from:
kind: DockerImage
name: node:8-alpine
type: Docker
successfulBuildsHistoryLimit: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment