How can I map a docker location to my Jenkins workspace so that I can use the files in my Jenkins

+1 vote

Hey guys,

I was trying to execute few files from my container which are 2 html files which I can later  publish on Jenkins. As my Jenkins is hosted on one host machine not in my local and we are using git . Have to run dockerfile.compose.yml and dockerfile.build to do this. My container is a windows container. This is my below dockecompose file:

version: '3.5'

services:

  alpineautomation:

    container_name: alpineautomation

    hostname: alpineautomation

    build:

      context: ../..

      dockerfile: devops/k8s/Dockerfile.build

      args:

        GITSHA1: ${GITSHA1}

    image: alpineautomation

    volumes:

         - ./var/lib/jenkins/workspace/AlpineAutomation:C:\\ProgramData

    volumes:

         -  ./var/lib/jenkins/workspace/AlpineAutomation                                                                                                                              

Feb 25, 2020 in Docker by dineshkumar
• 130 points
4,954 views
So basically, you want to copy those 2 HTML files from a docker container to your Jenkins workspace. Is that what you are asking?
Do you want to mount Jenkins workspace in docker container using Jenkins pipeline? Are you referring to this?

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Docker

0 votes
1 answer

How can I connect a docker container to two docker networks that I have created?

Hi@akhtar, It's correct that the network argument of ...READ MORE

answered Mar 23, 2020 in Docker by MD
• 95,460 points
10,883 views
0 votes
2 answers

How can I inspect the file system of a failed `docker build

Failed command is a build that has ...READ MORE

answered Aug 6, 2018 in Docker by Nilesh
• 7,060 points
3,157 views
0 votes
1 answer

Can you use docker-compose files to start services in Docker 1.12 swarm-mode?

Yess, you can. you must download/install the ...READ MORE

answered Aug 10, 2018 in Docker by Kalgi
• 52,350 points
719 views
0 votes
1 answer

Can I give an advance instructions to run later, during the next build stage in docker?

You can definitely give a trigger instruction ...READ MORE

answered Jul 2, 2019 in Docker by Sirajul
• 59,230 points
1,129 views
0 votes
1 answer

How to configure my docker container to use a different logging driver?

When you start a docker container, you ...READ MORE

answered Jul 4, 2019 in Docker by Sirajul
• 59,230 points
1,402 views
0 votes
0 answers

How to invoke a Docker secret key in c# console application? I want a sample code for it.

Actually I want hide a salt key ...READ MORE

Mar 20, 2020 in Docker by anonymous
• 120 points
1,160 views
0 votes
1 answer
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP