Cat Command without Object In Container Template












-3















i'm interested with jenkins dynamic slave in kubernetes with this repo



https://github.com/fabric8io/kubernetes-plugin



I know cat use to be followed by object, but in this template it just cat without object behind.



So what's the function of the "cat" command below?



def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, containers: [
containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', ttyEnabled: true, **command: 'cat'**),
containerTemplate(name: 'golang', image: 'golang:1.8.0', ttyEnabled: true, **command: 'cat'**)
]) {


______Found the answer by myself________



For you all that misunderstand and you all that downvote my question



So, the cat on that container template, is to keep the container running forever, so the container won't be recreated again when the container has been created










share|improve this question

























  • see github.com/jenkinsci/kubernetes-plugin#constraints "Other containers must run a long running process, so the container does not exit. If the default entrypoint or command just runs something and exit then it should be overridden with something like cat with ttyEnabled: true."

    – csanchez
    Jan 30 at 15:27


















-3















i'm interested with jenkins dynamic slave in kubernetes with this repo



https://github.com/fabric8io/kubernetes-plugin



I know cat use to be followed by object, but in this template it just cat without object behind.



So what's the function of the "cat" command below?



def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, containers: [
containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', ttyEnabled: true, **command: 'cat'**),
containerTemplate(name: 'golang', image: 'golang:1.8.0', ttyEnabled: true, **command: 'cat'**)
]) {


______Found the answer by myself________



For you all that misunderstand and you all that downvote my question



So, the cat on that container template, is to keep the container running forever, so the container won't be recreated again when the container has been created










share|improve this question

























  • see github.com/jenkinsci/kubernetes-plugin#constraints "Other containers must run a long running process, so the container does not exit. If the default entrypoint or command just runs something and exit then it should be overridden with something like cat with ttyEnabled: true."

    – csanchez
    Jan 30 at 15:27
















-3












-3








-3








i'm interested with jenkins dynamic slave in kubernetes with this repo



https://github.com/fabric8io/kubernetes-plugin



I know cat use to be followed by object, but in this template it just cat without object behind.



So what's the function of the "cat" command below?



def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, containers: [
containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', ttyEnabled: true, **command: 'cat'**),
containerTemplate(name: 'golang', image: 'golang:1.8.0', ttyEnabled: true, **command: 'cat'**)
]) {


______Found the answer by myself________



For you all that misunderstand and you all that downvote my question



So, the cat on that container template, is to keep the container running forever, so the container won't be recreated again when the container has been created










share|improve this question
















i'm interested with jenkins dynamic slave in kubernetes with this repo



https://github.com/fabric8io/kubernetes-plugin



I know cat use to be followed by object, but in this template it just cat without object behind.



So what's the function of the "cat" command below?



def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, containers: [
containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', ttyEnabled: true, **command: 'cat'**),
containerTemplate(name: 'golang', image: 'golang:1.8.0', ttyEnabled: true, **command: 'cat'**)
]) {


______Found the answer by myself________



For you all that misunderstand and you all that downvote my question



So, the cat on that container template, is to keep the container running forever, so the container won't be recreated again when the container has been created







jenkins kubernetes






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 18 at 9:13







Foosome

















asked Nov 21 '18 at 5:14









FoosomeFoosome

285




285













  • see github.com/jenkinsci/kubernetes-plugin#constraints "Other containers must run a long running process, so the container does not exit. If the default entrypoint or command just runs something and exit then it should be overridden with something like cat with ttyEnabled: true."

    – csanchez
    Jan 30 at 15:27





















  • see github.com/jenkinsci/kubernetes-plugin#constraints "Other containers must run a long running process, so the container does not exit. If the default entrypoint or command just runs something and exit then it should be overridden with something like cat with ttyEnabled: true."

    – csanchez
    Jan 30 at 15:27



















see github.com/jenkinsci/kubernetes-plugin#constraints "Other containers must run a long running process, so the container does not exit. If the default entrypoint or command just runs something and exit then it should be overridden with something like cat with ttyEnabled: true."

– csanchez
Jan 30 at 15:27







see github.com/jenkinsci/kubernetes-plugin#constraints "Other containers must run a long running process, so the container does not exit. If the default entrypoint or command just runs something and exit then it should be overridden with something like cat with ttyEnabled: true."

– csanchez
Jan 30 at 15:27














1 Answer
1






active

oldest

votes


















1














That's the command that's executed. if you don't know what the cat command does, here's some info: http://www.linfo.org/cat.html (it's most commonly used to display files).



In the above context it's used to prove the concept of running commands in another container by displaying the piped stream.






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53405633%2fcat-command-without-object-in-container-template%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    That's the command that's executed. if you don't know what the cat command does, here's some info: http://www.linfo.org/cat.html (it's most commonly used to display files).



    In the above context it's used to prove the concept of running commands in another container by displaying the piped stream.






    share|improve this answer






























      1














      That's the command that's executed. if you don't know what the cat command does, here's some info: http://www.linfo.org/cat.html (it's most commonly used to display files).



      In the above context it's used to prove the concept of running commands in another container by displaying the piped stream.






      share|improve this answer




























        1












        1








        1







        That's the command that's executed. if you don't know what the cat command does, here's some info: http://www.linfo.org/cat.html (it's most commonly used to display files).



        In the above context it's used to prove the concept of running commands in another container by displaying the piped stream.






        share|improve this answer















        That's the command that's executed. if you don't know what the cat command does, here's some info: http://www.linfo.org/cat.html (it's most commonly used to display files).



        In the above context it's used to prove the concept of running commands in another container by displaying the piped stream.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 18 at 9:17









        gsamaras

        51.6k24104189




        51.6k24104189










        answered Nov 21 '18 at 7:14









        Markus DreschMarkus Dresch

        1,702419




        1,702419
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53405633%2fcat-command-without-object-in-container-template%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            Xamarin.form Move up view when keyboard appear

            Post-Redirect-Get with Spring WebFlux and Thymeleaf

            Anylogic : not able to use stopDelay()