nodeshift-archived / centos7-s2i-nodejs Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED OpenShift S2I builder images for Node.js ✨
License: Apache License 2.0
DEPRECATED OpenShift S2I builder images for Node.js ✨
License: Apache License 2.0
The restore-artifacts step of our assemble script which will restore npm dependencies is intended to make redeployments quicker because we don't need to resinstall the dependencies on every build. However, with the permission handling that openshift uses, and the fact that users may indeed be doing things during the run
phase which need to write to the node_modules
directory, this seems to be causing more problems than it's worth. For example: #92
I think we should consider removing this optimization from the builder image.
It's not reasonable to maintain the correct version numbers in README.md across all branches, and it's only really relevant in master
since we use it to auto-populate the Docker hub page for this image.
Now that we are being more deliberate about things, we should not be publishing with every push to github. Autobuilds in Docker Cloud should be disabled.
This is an artifact from earlier that is no longer used. It should be removed from master
, 8.x
and 9.x
Use this issue template to report a minor version bump in Node.js.
New Node.js version number: 8.9.4-4
Check out the branch for whatever version is being updated. E.g.
git checkout v8.x
All of the following tasks occur on this branch.
NODE_VERSION
and NPM_VERSION
(not relevant).node-metadata -i <major-version> | jq '.' > releases.json
node-image-stream -f releases.json -i bucharestgold/centos7-s2i-nodejs > image-streams.centos7.json
make all
passes successfully.git tag -s -m 'Update to Node.js version 8.10.0' v8.10.0
DOCKER_USER
and DOCKER_PASS
in your environment).make tag publish
git push origin <branch> --follow-tags
.Fixes: #38
It is quite out of date
Hey folks,
Not exactly sure if this is user error, something I've missed, or a bug... but... here goes:
Essentially I am having trouble getting an S2I build to run because some things seem to be missing, and I'm not sure why.
The image build actually succeeds, but when the node app actually spins up and starts running NPM_RUN scripts, it fails to find things like "rimraf" and "cpy" which are specified as devDependencies in the package.json file. I've even tried manually running npm install in the container, as well.
git version 2.9.3
Environment:
DEV_MODE=false
NODE_ENV=production
DEBUG_PORT=5858
Running as user uid=1000140000 gid=0(root) groups=0(root),1000140000
Launching via npm...
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prestart:openshift: [email protected]
npm info lifecycle [email protected]~start:openshift: [email protected]
> [email protected] start:openshift /opt/app-root/src
> npm run setup && npm run build:prod
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~presetup: [email protected]
npm info lifecycle [email protected]~setup: [email protected]
> [email protected] setup /opt/app-root/src
> npm install
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm http fetch GET 200 https://registry.npmjs.org/rhoaster 172ms
npm http fetch GET 200 https://registry.npmjs.org/nodeshift 179ms
npm http fetch GET 200 https://registry.npmjs.org/openshift-config-loader 38ms
npm http fetch GET 200 https://registry.npmjs.org/openshift-rest-client 38ms
npm http fetch GET 200 https://registry.npmjs.org/openshift-rest-client/-/openshift-rest-client-1.1.1.tgz 34ms
npm http fetch GET 200 https://registry.npmjs.org/yargs 57ms
npm http fetch GET 200 https://registry.npmjs.org/openshift-config-loader 81ms
npm http fetch GET 200 https://registry.npmjs.org/git-repo-info 88ms
npm http fetch GET 200 https://registry.npmjs.org/js-yaml 89ms
npm http fetch GET 200 https://registry.npmjs.org/chalk 94ms
npm http fetch GET 200 https://registry.npmjs.org/find-up 31ms
npm http fetch GET 200 https://registry.npmjs.org/cliui 32ms
npm http fetch GET 200 https://registry.npmjs.org/string-width 24ms
npm http fetch GET 200 https://registry.npmjs.org/which-module 28ms
npm http fetch GET 200 https://registry.npmjs.org/yargs-parser 29ms
npm http fetch GET 200 https://registry.npmjs.org/openshift-rest-client 126ms
npm http fetch GET 200 https://registry.npmjs.org/rimraf 128ms
npm http fetch GET 200 https://registry.npmjs.org/tar 129ms
npm http fetch GET 200 https://registry.npmjs.org/esprima 35ms
npm http fetch GET 200 https://registry.npmjs.org/ansi-styles 38ms
npm http fetch GET 200 https://registry.npmjs.org/locate-path 34ms
npm http fetch GET 200 https://registry.npmjs.org/supports-color 39ms
npm http fetch GET 200 https://registry.npmjs.org/strip-ansi 26ms
npm http fetch GET 200 https://registry.npmjs.org/os-locale 87ms
npm http fetch GET 200 https://registry.npmjs.org/is-fullwidth-code-point 25ms
npm http fetch GET 200 https://registry.npmjs.org/camelcase 25ms
npm http fetch GET 200 https://registry.npmjs.org/chownr 34ms
npm http fetch GET 200 https://registry.npmjs.org/fs-minipass 36ms
npm http fetch GET 200 https://registry.npmjs.org/minipass 36ms
npm http fetch GET 200 https://registry.npmjs.org/minizlib 33ms
npm http fetch GET 200 https://registry.npmjs.org/safe-buffer 34ms
npm http fetch GET 200 https://registry.npmjs.org/yallist 35ms
npm http fetch GET 200 https://registry.npmjs.org/p-locate 29ms
npm http fetch GET 200 https://registry.npmjs.org/glob 31ms
npm http fetch GET 200 https://registry.npmjs.org/path-exists 25ms
npm http fetch GET 200 https://registry.npmjs.org/has-flag 41ms
npm http fetch GET 200 https://registry.npmjs.org/ansi-regex 41ms
npm http fetch GET 200 https://registry.npmjs.org/execa 41ms
npm http fetch GET 200 https://registry.npmjs.org/mem 39ms
npm http fetch GET 200 https://registry.npmjs.org/p-limit 26ms
npm http fetch GET 200 https://registry.npmjs.org/npm-run-path 27ms
npm http fetch GET 200 https://registry.npmjs.org/mimic-fn 28ms
npm http fetch GET 200 https://registry.npmjs.org/get-stream 29ms
npm http fetch GET 200 https://registry.npmjs.org/p-try 25ms
npm http fetch GET 200 https://registry.npmjs.org/p-finally 31ms
npm http fetch GET 200 https://registry.npmjs.org/strip-eof 31ms
npm http fetch GET 200 https://registry.npmjs.org/cross-spawn 32ms
npm http fetch GET 200 https://registry.npmjs.org/path-key 23ms
npm http fetch GET 200 https://registry.npmjs.org/shebang-command 22ms
npm http fetch GET 200 https://registry.npmjs.org/shebang-regex 19ms
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
npm info linkStuff [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
> [email protected] postinstall /opt/app-root/src
> echo 'All done!'
All done!
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm info lifecycle undefined~postshrinkwrap: undefined
npm WARN [email protected] requires a peer of @angular/core@^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/router@^3.0.0 but none is installed. You must install peer dependencies yourself.
up to date in 2.952s
┌───────────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
└───────────────────────────────────────────────────────────────┘
npm info ok
npm info lifecycle [email protected]~postsetup: [email protected]
┌───────────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
└───────────────────────────────────────────────────────────────┘
npm info ok
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~prebuild:prod: [email protected]
> [email protected] prebuild:prod /opt/app-root/src
> npm run clean-and-copy
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~preclean-and-copy: [email protected]
npm info lifecycle [email protected]~clean-and-copy: [email protected]
> [email protected] clean-and-copy /opt/app-root/src
> npm run clean-dist && npm run copy-files
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~preclean-dist: [email protected]
npm info lifecycle [email protected]~clean-dist: [email protected]
> [email protected] clean-dist /opt/app-root/src
> rimraf dist
sh: rimraf: command not found
npm info lifecycle [email protected]~clean-dist: Failed to exec clean-dist script
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] clean-dist: `rimraf dist`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] clean-dist script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
└───────────────────────────────────────────────────────────────┘
npm ERR! A complete log of this run can be found in:
npm ERR! /opt/app-root/src/.npm/_logs/2018-05-17T17_33_56_057Z-debug.log
npm info lifecycle [email protected]~clean-and-copy: Failed to exec clean-and-copy script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] clean-and-copy: `npm run clean-dist && npm run copy-files`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] clean-and-copy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
└───────────────────────────────────────────────────────────────┘
npm ERR! A complete log of this run can be found in:
npm ERR! /opt/app-root/src/.npm/_logs/2018-05-17T17_33_56_105Z-debug.log
npm info lifecycle [email protected]~prebuild:prod: Failed to exec prebuild:prod script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prebuild:prod: `npm run clean-and-copy`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prebuild:prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
└───────────────────────────────────────────────────────────────┘
npm ERR! A complete log of this run can be found in:
npm ERR! /opt/app-root/src/.npm/_logs/2018-05-17T17_33_56_142Z-debug.log
npm info lifecycle [email protected]~start:openshift: Failed to exec start:openshift script
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start:openshift: `npm run setup && npm run build:prod`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start:openshift script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
┌───────────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
└───────────────────────────────────────────────────────────────┘
npm ERR! A complete log of this run can be found in:
npm ERR! /opt/app-root/src/.npm/_logs/2018-05-17T17_33_56_180Z-debug.log
I'm not a node expert so I'm a bit at a loss.
This is the repo: https://github.com/snowdrop/snowdrop-site-angular (deployment instructions I'm using are in the readme.)
These are the commands to run the S2I build that I'm using:
find . | grep openshiftio | grep application | xargs -n 1 oc apply -f
oc new-app --template=snowdrop-site-angular
Any insight would be appreciated!
When a build is being recreated on openshift and we are restoring existing artifacts from the image cache, we explicitly call npm run postinstall
even if no postinstall
script exists.
A workaround for this is to add a noop postinstall
script to your package.json
This will warn us of any new Buffer()
usage which will be deprecated in 10.0.0 one month from now.
This seems to be a common use of the image - to create static single-page apps that are built from React or Angular codebases. Until we create a separate builder image tuned for this kind of usage, we need to document best practices.
See: #94
i'm working on this nodeshift issue, nodeshift/nodeshift#208 to get buildConfig env vars, so i set NODE_ENV=development in my buildConfig and the build phase works fine with installing dev deps.
But during the pod deploy, i get permission issues now, when trying to load with nodemon(since DEV_MODE=true is set because of the development node env)
i thought by moving https://github.com/bucharest-gold/centos7-s2i-nodejs/blob/master/s2i/assemble#L61 down a little, it would fix it. but i'm either doing something wrong, which is very possible, or that wasn't the problem
BUILDER=bucharestgold/centos7-s2i-nodejs:8.x NODE_VERSION=8.3.0 ./test/run.sh
Running s2i build --force-pull=false file://./test/test-app bucharestgold/centos7-s2i-nodejs:8.x bucharestgold/centos7-s2i-nodejs-testapp
Error: unknown flag: --force-pull
Downgrading to 1.1.5 solves the issue.
https://github.com/openshift/source-to-image/releases
While importing image stream image-streams.centos7.json into Openshift 3.5 I get an error:
metadata.name: Invalid value: "bucharestgold/centos7-s2i-nodejs": may not contain '/'
According to https://kubernetes.io/docs/concepts/overview/working-with-objects/names/ the names of Kubernetes resources should be up to maximum length of 253 characters and consist of lower case alphanumeric characters, -, and ., so '/' is not allowed.
When importing the image-streams.centos7.json
file as described in README.md
, the image stream is imported in to the minishift
and/or openshift
cluster, but it is no longer displayed in the web UI as a part of the catalog.
This behavior exists for both minishift
and OpenShift Online.
Once imported, the image will appear in the Builds->Images page, but not in the catalog.
The documentation for the image stream file format is here: https://docs.openshift.com/container-platform/3.7/dev_guide/managing_images.html#writing-image-streams-for-s2i-builders
When attempting to create an ImageStream
that is displayed in the catalog using the example YAML there, it also does not appear in the catalog. So this issue may be upstream?
I0531 17:35:30.905920 1 sti.go:660] ┌───────────────────────────────────────────────────────────────┐
I0531 17:35:30.905932 1 sti.go:660] │ npm update check failed │
I0531 17:35:30.905940 1 sti.go:660] │ Try running with sudo or get access │
I0531 17:35:30.905951 1 sti.go:660] │ to the local update config store via │
I0531 17:35:30.905957 1 sti.go:660] │ sudo chown -R $USER:$(id -gn $USER) /opt/app-root/src/.config │
I0531 17:35:30.905965 1 sti.go:660] └───────────────────────────────────────────────────────────────┘
See subject
Not sure the best way to do this. In origin-s2i-nodejs, we're using a node script here. I wonder if this could be a part of the tool you are currently working on @helio-frota
When using mean-booster + nodeshift + rhoaster, depending on the configuration of the environment, we see an error.
locally oc cluster up
(v3.9.0-alpha) + nodeshift
10:31 $ npm run openshift
> [email protected] openshift /home/hf/Desktop/mean-booster
> nodeshift --strictSSL=false --nodeVersion=8.x --build.forcePull=true
2018-02-19T13:31:43.199Z INFO loading configuration
2018-02-19T13:31:43.209Z INFO using namespace myproject at https://127.0.0.1:8443
2018-02-19T13:31:43.240Z INFO creating archive of package.json, README.md, server.js, app
2018-02-19T13:31:43.303Z INFO using existing build configuration mean-booster-s2i
2018-02-19T13:31:43.308Z INFO using existing image stream mean-booster
2018-02-19T13:31:43.308Z INFO uploading binary archive /home/hf/Desktop/mean-booster/tmp/nodeshift/build/archive.tar
2018-02-19T13:31:47.128Z INFO binary upload complete
2018-02-19T13:31:47.128Z INFO waiting for build to finish
2018-02-19T13:31:50.441Z TRACE ---> Installing application source
2018-02-19T13:31:50.443Z TRACE ---> Building your Node application from source
2018-02-19T13:31:50.443Z TRACE ---> Using 'npm install'
2018-02-19T13:32:56.579Z TRACE error: build error: non-zero (13) exit code from bucharestgold/centos7-s2i-nodejs:latest
2018-02-19T13:32:57.666Z ERROR build failed with message: Assemble script failed.
2018-02-19T13:32:57.667Z ERROR Assemble script failed.
2018-02-19T13:32:57.667Z ERROR Status code undefined
locally oc cluster up
(v3.9.0-alpha) + rhoaster
10:19 $ npm run test:integration
> [email protected] test:integration /home/hf/Desktop/mean-booster
> tape test/integration/*.js | tap-spec
No deployment found. Deploying...
2018-02-19T13:19:32.004Z INFO loading configuration
2018-02-19T13:19:32.007Z INFO using namespace myproject at https://127.0.0.1:8443
2018-02-19T13:19:32.011Z INFO creating archive of package.json, README.md, server.js, app
2018-02-19T13:19:32.052Z INFO creating build configuration mean-booster-s2i
2018-02-19T13:19:32.052Z INFO Using s2i image bucharestgold/centos7-s2i-nodejs with tag latest
2018-02-19T13:19:32.144Z INFO creating image stream mean-booster
2018-02-19T13:19:32.151Z INFO uploading binary archive /home/hf/Desktop/mean-booster/tmp/nodeshift/build/archive.tar
2018-02-19T13:19:35.840Z INFO binary upload complete
2018-02-19T13:19:35.840Z INFO waiting for build to finish
2018-02-19T13:19:59.454Z TRACE ---> Installing application source
2018-02-19T13:19:59.486Z TRACE ---> Building your Node application from source
2018-02-19T13:19:59.486Z TRACE ---> Using 'npm install'
2018-02-19T13:21:01.685Z TRACE error: build error: non-zero (13) exit code from bucharestgold/centos7-s2i-nodejs:latest
2018-02-19T13:21:03.220Z ERROR build failed with message: Assemble script failed.
Error: Assemble script failed.
at module.exports (/home/hf/Desktop/mean-booster/node_modules/rhoaster/node_modules/nodeshift/lib/binary-build.js:59:13)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
Error: Service unavailable
at waitForDeployment (/home/hf/Desktop/mean-booster/node_modules/rhoaster/index.js:98:9)
at <anonymous>
..................................................
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:integration: `tape test/integration/*.js | tap-spec`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:integration script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/hf/.npm/_logs/2018-02-19T13_21_55_082Z-debug.log
The same code works on travis --> https://travis-ci.org/bucharest-gold/mean-booster/builds/343428482#L1589
Apparently we can not run the minishift in travis, so it would be interesting to be able to use the oc cluster up
locally to be as close as possible to the CI.
The current build does not execute npm run-script build
In order to make it work, you need to manually connect and execute it on the pod. New builds with new dependencies can fail because of that.
Using a post deployment hook returns `
container_linux.go:247: starting container process caused "exec: \"npm run-script build\": executable file not found in $PATH"
--
Reading the README points to an imagestream that does not exist.
Furthermore, in the imagestreams folder there are 2 imagestreams for nodejs-centos, one in json and another one in yaml, which are not related.
I'm with the same issue reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=1472311
After change (locally) this like https://github.com/bucharest-gold/centos7-s2i-nodejs/blob/master/Makefile#L40
from:
docker login --username...
to:
docker login docker.io --username...
Solves the problem of using registry.fedoraproject.org/v1
inside ~/.docker/config.json
.
But I'm still getting the error message:
Login Succeeded
docker push bucharestgold/centos7-s2i-nodejs:8.x
The push refers to a repository [registry.fedoraproject.org/bucharestgold/centos7-s2i-nodejs]
4b0bc5b75983: Preparing
cb96aea742c3: Preparing
f1bbaf33b49c: Preparing
4b1e8db0189a: Preparing
34e7b85d83e4: Preparing
unauthorized: authentication required
make: *** [Makefile:41: publish] Error 1
Make sure we have a documented way to publish these images.
We currently add tags for LTS names and top-level version numbers, e.g. 8.x
, as well as latest
. For completeness, we should add tags for the specific versions, e.g. 8.9.4
.
See: here
Use standard-version to manage changelog.md
Enable a debugger to attach to a node.js application running in OpenShift.
ATM, you can set the following environment variables:
which will provide some access over 5858, but you should consider a different solution.
Released June 29, 2017.
{
"version": "v8.1.3",
"date": "2017-06-29",
"files": [
"aix-ppc64",
"headers",
"linux-arm64",
"linux-armv6l",
"linux-armv7l",
"linux-ppc64le",
"linux-x64",
"linux-x86",
"osx-x64-pkg",
"osx-x64-tar",
"src",
"sunos-x64",
"sunos-x86",
"win-x64-exe",
"win-x64-msi",
"win-x86-exe",
"win-x86-msi"
],
"npm": "5.0.3",
"v8": "5.8.283.41",
"uv": "1.12.0",
"zlib": "1.2.11",
"openssl": "1.0.2l",
"modules": "57",
"lts": false
}
Here is showing 10.1.0 | (10.x)
https://hub.docker.com/r/bucharestgold/centos7-s2i-nodejs/
And the last published is 10.4.0
When following the guide: https://github.com/bucharest-gold/centos7-s2i-nodejs/blob/master/PUBLISHING.md is easy to forget to update the Readme.
Just a suggestion what do you think of looking for ways to reduce the images size.
I think it can be cool to have images sizes similar alpine-node they get sizes of ≈40MB. If we have that, it can dramatically increase deploy speed and transfer between node's.
any thoughts ?
Thanks.
New 6.x release on Sept. 5.
The version 8.3.0 is on dockerhub and workin, but I'm not following whats happened to the branch
14:36 $ git push origin origin/8.x
Everything up-to-date
I'm trying to push the changes to the 8.x github branch
The application image that results from a build has directory permissions that prevent writes.
Since our build requires make in order to set some environment variables about the version numbers, we can't use docker's autobuild/autotest feature with its default behavior, since all that does is run docker build
. We need to pass --build-args
flags to that command, and overriding build hooks is a way to do that.
See: OVERRIDE THE “BUILD” PHASE TO SET VARIABLES in the Docker documentation.
Use this issue template to report a minor version bump in Node.js.
New Node.js version number: 9.4.0-4
Check out the branch for whatever version is being updated. E.g.
git checkout v9.x
All of the following tasks occur on this branch.
NODE_VERSION
and NPM_VERSION
(not relevant).node-metadata -i <major-version> | jq '.' > releases.json
node-image-stream -f releases.json -i bucharestgold/centos7-s2i-nodejs > image-streams.centos7.json
make all
passes successfully.git tag -s -m 'Update to Node.js version 8.10.0' v8.10.0
DOCKER_USER
and DOCKER_PASS
in your environment).make tag publish
git push origin <branch> --follow-tags
.Fixes: #38
running on minishift,
setting DEV_MODE=true
https://gist.github.com/lholmquist/ef9a55586c186fa6e35cd2a8db0ca532
The way a node script is executed results in the node script not running under pid 1.
This is an example of the process table:
UID PID PPID C STIME TTY TIME CMD
default 1 0 0 07:14 ? 00:00:00 /usr/bin/scl enable rh-git29 --
default 7 1 0 07:14 ? 00:00:00 /bin/bash /var/tmp/scl2s24MJ
default 10 7 1 07:14 ? 00:00:00 node svc.js
When a container is killed docker will send the SIGTERM signal to pid 1 in order to enable a graceful shutdown. However, because the script does not run under pid 1, this signal never reaches the script and the script cannot issue a graceful shutdown. This might not be an issue for lots of scripts, but for some, including mine, it is because it has to do some cleaning up activities before shutting down.
Our docker file extends openshift/base-centos7
. We need to automatically publish new images when this base image is updated.
This is currently possible in Docker Hub, but for whatever reason, if you already have a repository created in docker hub, you cannot convert it to have this auto linking. At the moment, docker cloud is doing our automated builds and pushing to docker hub, since this has been the published direction of those tools. However, docker cloud still does not have repository linking available.
Compare
We need to set up CI for this repo, we'll want to run 'make all' for each branch: 'master', 4.x, 5.x, 6.x and 7.x
Docker's automated builds prefer for branches to be used to indicate tags on image builds. Since our images are tagged by nodejs version number, we should use branches to distinguish between them.
So, it currently seems like there is no way to run in "development" NODE_ENV during a build, then to run in "production" NODE_ENV when the image is actually deployed.
The BuildConfig NODE_ENV doesn't seem to get picked up.
Would be nice to have the node version showing but I don't know if this is good to be before or after npm install
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.