Live data from Hacker News

Show HN: Kubernates in Node.js

github.com

1–10 of 71 posts

Re: Show HN: Kubernates in Node.js

#5
depending on what, exactly "bash commands don't work" https://github.com/Megapixel99/nodejs-k8s/blob/master/functi...> is talking about, but a thing that bites A LOT of folks when dealing with command: [] (and its args:[] friend) is that they are exec style, not "sh -c" style as one might experience with a Dockerfile RUN command. I think Dockerfile's RUN [""] syntax is also exec style, but I don't use it much because it's horrifically verbose

As a concrete example, command: ["bash -c uptime"] will not work because there is no such command '/usr/bin/bash -c uptime' and the actual form is command: ["bash", "-c", "uptime"]

Related, it often bites people that exec does no shell interpolation, neither resolving variables nor redirection, so command: ["doit", ">/dev/null"] will not shake out, nor will command: ["echo", "$HOSTNAME"] (although there is a nuance to that since kubernetes itself will actually resolve any env:[] references in a (regrettably horrible) syntax of command: ["echo", "$(USERNAME)"], env: [{name: USERNAME, value: megapixel99}]

All in all, congratulations on your Show HN!

Re: Show HN: Kubernates in Node.js

#9
post #5

depending on what, exactly "bash commands don't work" https://github.com/Megapixel99/nodejs-k8s/blob/master/functi... > is talking about, but a thing that bites A LOT of folks when dealing with command: [] (and its args:[] friend) is that they are exec style, not "sh -c" style as one might experience with a Dockerfile RUN command. I think Dockerfile's RUN [""] syntax is also exec style, but I don't use it much becaus…

This bites me all the time. It really shouldn't, as I'm always like: "man i'm an idiot". But inevitably I make this mistake and lose time over it.

Re: Show HN: Kubernates in Node.js

#10
post #5

depending on what, exactly "bash commands don't work" https://github.com/Megapixel99/nodejs-k8s/blob/master/functi... > is talking about, but a thing that bites A LOT of folks when dealing with command: [] (and its args:[] friend) is that they are exec style, not "sh -c" style as one might experience with a Dockerfile RUN command. I think Dockerfile's RUN [""] syntax is also exec style, but I don't use it much becaus…

Really a feature though. No quote issues, no shell interpolation, explicit variable resolution in the application’s scope — for most scripts I much prefer this as the default behavior.
Post reply on HN