Skip to content

Instantly share code, notes, and snippets.

@hodrigohamalho
Created April 24, 2018 20:52
Show Gist options
  • Select an option

  • Save hodrigohamalho/83a2d88ee0e857c6d876223dcf40b8ac to your computer and use it in GitHub Desktop.

Select an option

Save hodrigohamalho/83a2d88ee0e857c6d876223dcf40b8ac to your computer and use it in GitHub Desktop.
NodeJS Nginx Chained Build
oc create -f https://github.com/sclorg/s2i-nodejs-container/blob/master/imagestreams/nodejs-rhel7.json -n openshift
oc new-project app-nodejs
oc new-build nodejs:8~https://github.com/hodrigohamalho/sal-frontend --name=sal-frontend-s2i
oc new-build --name=sal-frontend-nginx \
--docker-image=registry.access.redhat.com/rhscl/nginx-112-rhel7 \
--source-image=sal-frontend-s2i \
--source-image-path=/opt/app-root/src/dist/:. \
--dockerfile=$'FROM rhscl/nginx-112-rhel7\nCOPY dist /opt/app-root/src\nCMD ["nginx", "-g", "daemon off;"]'
oc new-app sal-frontend-nginx --name=sal-frontend
@hodrigohamalho
Copy link
Author

Perfect @rafaeltuelho!

Clean and simple!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment