Fail to run Postman Remote URL with Docker and Environment File












1















I am able to run the postman collection below with environment file from the command line using newman



newman run https://www.getpostman.com/collections/b9dc5f129194190a8e54 -e Local.postman_environment.json



If I try using docker command below it fails with environment file not found.



docker run -t postman/newman_ubuntu1404 run https://www.getpostman.com/collections/b9dc5f129194190a8e54 -e Local.postman_environment.json
error: ENOENT: no such file or directory, open 'Local.postman_environment.json'



If I run without the environment file in the command, the collection is run successfully but suffice to say the environment variables are missing. Presumably something wrong in the way I am sending the command which includes the environment file?










share|improve this question























  • I had this trouble too and it was so annoying - You may need to specify a volume. I don't like sharing links to work but I managed to do it for this in the end, not sure if some of it might help you github.com/DannyDainton/postman-docker

    – Danny Dainton
    Nov 23 '18 at 16:28













  • Thanks Danny. I actually found your notes on postman which shortly after which helped a lot! I very quickly hit another barrier whereby my collection is being run before my web app is ready. Seems to be not uncommon. You may have had it also. Problem is it's not enough to check TCP connection as this does not ensure the app is ready. I'm having a problem in my docker-compose config to call a wait script before running the collection

    – David
    Nov 26 '18 at 11:53











  • Can it use a depends_on or something in the compose file?

    – Danny Dainton
    Nov 26 '18 at 12:53











  • depends_on is there. There is the option to use healthchecks which should be simple to add in the app config

    – David
    Nov 26 '18 at 13:11








  • 1





    Anything useful here for that? - stackoverflow.com/questions/47088261/…

    – Danny Dainton
    Nov 26 '18 at 13:33
















1















I am able to run the postman collection below with environment file from the command line using newman



newman run https://www.getpostman.com/collections/b9dc5f129194190a8e54 -e Local.postman_environment.json



If I try using docker command below it fails with environment file not found.



docker run -t postman/newman_ubuntu1404 run https://www.getpostman.com/collections/b9dc5f129194190a8e54 -e Local.postman_environment.json
error: ENOENT: no such file or directory, open 'Local.postman_environment.json'



If I run without the environment file in the command, the collection is run successfully but suffice to say the environment variables are missing. Presumably something wrong in the way I am sending the command which includes the environment file?










share|improve this question























  • I had this trouble too and it was so annoying - You may need to specify a volume. I don't like sharing links to work but I managed to do it for this in the end, not sure if some of it might help you github.com/DannyDainton/postman-docker

    – Danny Dainton
    Nov 23 '18 at 16:28













  • Thanks Danny. I actually found your notes on postman which shortly after which helped a lot! I very quickly hit another barrier whereby my collection is being run before my web app is ready. Seems to be not uncommon. You may have had it also. Problem is it's not enough to check TCP connection as this does not ensure the app is ready. I'm having a problem in my docker-compose config to call a wait script before running the collection

    – David
    Nov 26 '18 at 11:53











  • Can it use a depends_on or something in the compose file?

    – Danny Dainton
    Nov 26 '18 at 12:53











  • depends_on is there. There is the option to use healthchecks which should be simple to add in the app config

    – David
    Nov 26 '18 at 13:11








  • 1





    Anything useful here for that? - stackoverflow.com/questions/47088261/…

    – Danny Dainton
    Nov 26 '18 at 13:33














1












1








1








I am able to run the postman collection below with environment file from the command line using newman



newman run https://www.getpostman.com/collections/b9dc5f129194190a8e54 -e Local.postman_environment.json



If I try using docker command below it fails with environment file not found.



docker run -t postman/newman_ubuntu1404 run https://www.getpostman.com/collections/b9dc5f129194190a8e54 -e Local.postman_environment.json
error: ENOENT: no such file or directory, open 'Local.postman_environment.json'



If I run without the environment file in the command, the collection is run successfully but suffice to say the environment variables are missing. Presumably something wrong in the way I am sending the command which includes the environment file?










share|improve this question














I am able to run the postman collection below with environment file from the command line using newman



newman run https://www.getpostman.com/collections/b9dc5f129194190a8e54 -e Local.postman_environment.json



If I try using docker command below it fails with environment file not found.



docker run -t postman/newman_ubuntu1404 run https://www.getpostman.com/collections/b9dc5f129194190a8e54 -e Local.postman_environment.json
error: ENOENT: no such file or directory, open 'Local.postman_environment.json'



If I run without the environment file in the command, the collection is run successfully but suffice to say the environment variables are missing. Presumably something wrong in the way I am sending the command which includes the environment file?







docker postman






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 23 '18 at 16:21









DavidDavid

284




284













  • I had this trouble too and it was so annoying - You may need to specify a volume. I don't like sharing links to work but I managed to do it for this in the end, not sure if some of it might help you github.com/DannyDainton/postman-docker

    – Danny Dainton
    Nov 23 '18 at 16:28













  • Thanks Danny. I actually found your notes on postman which shortly after which helped a lot! I very quickly hit another barrier whereby my collection is being run before my web app is ready. Seems to be not uncommon. You may have had it also. Problem is it's not enough to check TCP connection as this does not ensure the app is ready. I'm having a problem in my docker-compose config to call a wait script before running the collection

    – David
    Nov 26 '18 at 11:53











  • Can it use a depends_on or something in the compose file?

    – Danny Dainton
    Nov 26 '18 at 12:53











  • depends_on is there. There is the option to use healthchecks which should be simple to add in the app config

    – David
    Nov 26 '18 at 13:11








  • 1





    Anything useful here for that? - stackoverflow.com/questions/47088261/…

    – Danny Dainton
    Nov 26 '18 at 13:33



















  • I had this trouble too and it was so annoying - You may need to specify a volume. I don't like sharing links to work but I managed to do it for this in the end, not sure if some of it might help you github.com/DannyDainton/postman-docker

    – Danny Dainton
    Nov 23 '18 at 16:28













  • Thanks Danny. I actually found your notes on postman which shortly after which helped a lot! I very quickly hit another barrier whereby my collection is being run before my web app is ready. Seems to be not uncommon. You may have had it also. Problem is it's not enough to check TCP connection as this does not ensure the app is ready. I'm having a problem in my docker-compose config to call a wait script before running the collection

    – David
    Nov 26 '18 at 11:53











  • Can it use a depends_on or something in the compose file?

    – Danny Dainton
    Nov 26 '18 at 12:53











  • depends_on is there. There is the option to use healthchecks which should be simple to add in the app config

    – David
    Nov 26 '18 at 13:11








  • 1





    Anything useful here for that? - stackoverflow.com/questions/47088261/…

    – Danny Dainton
    Nov 26 '18 at 13:33

















I had this trouble too and it was so annoying - You may need to specify a volume. I don't like sharing links to work but I managed to do it for this in the end, not sure if some of it might help you github.com/DannyDainton/postman-docker

– Danny Dainton
Nov 23 '18 at 16:28







I had this trouble too and it was so annoying - You may need to specify a volume. I don't like sharing links to work but I managed to do it for this in the end, not sure if some of it might help you github.com/DannyDainton/postman-docker

– Danny Dainton
Nov 23 '18 at 16:28















Thanks Danny. I actually found your notes on postman which shortly after which helped a lot! I very quickly hit another barrier whereby my collection is being run before my web app is ready. Seems to be not uncommon. You may have had it also. Problem is it's not enough to check TCP connection as this does not ensure the app is ready. I'm having a problem in my docker-compose config to call a wait script before running the collection

– David
Nov 26 '18 at 11:53





Thanks Danny. I actually found your notes on postman which shortly after which helped a lot! I very quickly hit another barrier whereby my collection is being run before my web app is ready. Seems to be not uncommon. You may have had it also. Problem is it's not enough to check TCP connection as this does not ensure the app is ready. I'm having a problem in my docker-compose config to call a wait script before running the collection

– David
Nov 26 '18 at 11:53













Can it use a depends_on or something in the compose file?

– Danny Dainton
Nov 26 '18 at 12:53





Can it use a depends_on or something in the compose file?

– Danny Dainton
Nov 26 '18 at 12:53













depends_on is there. There is the option to use healthchecks which should be simple to add in the app config

– David
Nov 26 '18 at 13:11







depends_on is there. There is the option to use healthchecks which should be simple to add in the app config

– David
Nov 26 '18 at 13:11






1




1





Anything useful here for that? - stackoverflow.com/questions/47088261/…

– Danny Dainton
Nov 26 '18 at 13:33





Anything useful here for that? - stackoverflow.com/questions/47088261/…

– Danny Dainton
Nov 26 '18 at 13:33












1 Answer
1






active

oldest

votes


















0














Figured out both problems



In docker-compose.yaml file:



 postman_checks:
container_name: postman_test
build: .
image: postman/newman_ubuntu1404
command:
run https://www.getpostman.com/collections/12345129194190a8e54
-e ./postman/Local.postman_environment.json
-g ./postman/postman_globals.json

healthcheck:
test: ["CMD", "curl", "http://127.0.0.1:8680"]
interval: 25s
timeout: 5s
retries: 50


The port 8680 in the health check is the internal docker port, not external. It's possible to connect to the container - docker inspect and look for State.Health






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%2f53450032%2ffail-to-run-postman-remote-url-with-docker-and-environment-file%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









    0














    Figured out both problems



    In docker-compose.yaml file:



     postman_checks:
    container_name: postman_test
    build: .
    image: postman/newman_ubuntu1404
    command:
    run https://www.getpostman.com/collections/12345129194190a8e54
    -e ./postman/Local.postman_environment.json
    -g ./postman/postman_globals.json

    healthcheck:
    test: ["CMD", "curl", "http://127.0.0.1:8680"]
    interval: 25s
    timeout: 5s
    retries: 50


    The port 8680 in the health check is the internal docker port, not external. It's possible to connect to the container - docker inspect and look for State.Health






    share|improve this answer




























      0














      Figured out both problems



      In docker-compose.yaml file:



       postman_checks:
      container_name: postman_test
      build: .
      image: postman/newman_ubuntu1404
      command:
      run https://www.getpostman.com/collections/12345129194190a8e54
      -e ./postman/Local.postman_environment.json
      -g ./postman/postman_globals.json

      healthcheck:
      test: ["CMD", "curl", "http://127.0.0.1:8680"]
      interval: 25s
      timeout: 5s
      retries: 50


      The port 8680 in the health check is the internal docker port, not external. It's possible to connect to the container - docker inspect and look for State.Health






      share|improve this answer


























        0












        0








        0







        Figured out both problems



        In docker-compose.yaml file:



         postman_checks:
        container_name: postman_test
        build: .
        image: postman/newman_ubuntu1404
        command:
        run https://www.getpostman.com/collections/12345129194190a8e54
        -e ./postman/Local.postman_environment.json
        -g ./postman/postman_globals.json

        healthcheck:
        test: ["CMD", "curl", "http://127.0.0.1:8680"]
        interval: 25s
        timeout: 5s
        retries: 50


        The port 8680 in the health check is the internal docker port, not external. It's possible to connect to the container - docker inspect and look for State.Health






        share|improve this answer













        Figured out both problems



        In docker-compose.yaml file:



         postman_checks:
        container_name: postman_test
        build: .
        image: postman/newman_ubuntu1404
        command:
        run https://www.getpostman.com/collections/12345129194190a8e54
        -e ./postman/Local.postman_environment.json
        -g ./postman/postman_globals.json

        healthcheck:
        test: ["CMD", "curl", "http://127.0.0.1:8680"]
        interval: 25s
        timeout: 5s
        retries: 50


        The port 8680 in the health check is the internal docker port, not external. It's possible to connect to the container - docker inspect and look for State.Health







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 26 '18 at 17:21









        DavidDavid

        284




        284
































            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%2f53450032%2ffail-to-run-postman-remote-url-with-docker-and-environment-file%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







            Popular posts from this blog

            Wiesbaden

            Marschland

            Dieringhausen