Table of contents
- create an agent for your app. Create a new Jenkins freestyle project for your app. In the "Build" section of the project, add a build step to run the "docker build" command to build the image for the container. Add a second step to run the "docker run" command to start a container using the image created in step 3.
- Create a Jenkins project to run "docker-compose up -d" command to start the multiple containers defined in the compose file (Hint- use day-19 Application & Database docker-compose file). Set up a cleanup step in the Jenkins project to run "docker-compose down" command to stop and remove the containers defined in the compose file.
create an agent for your app. Create a new Jenkins freestyle project for your app. In the "Build" section of the project, add a build step to run the "docker build" command to build the image for the container. Add a second step to run the "docker run" command to start a container using the image created in step 3.
Step 1: install jenkins.
Step 2: Create nodes or agent. set type as permanent agent.
Step 3: Click on item and give a project name. set as freestyle project.
Step 4: Set the build step as execute shell. Write all steps to execute the build process.
the project was built successfully.
Create a Jenkins project to run "docker-compose up -d" command to start the multiple containers defined in the compose file (Hint- use day-19 Application & Database docker-compose file). Set up a cleanup step in the Jenkins project to run "docker-compose down" command to stop and remove the containers defined in the compose file.
Step 1: Click on item and give a project name. set as freestyle project.
Step 2: Set the git repository link. Set branch specifier as main.
Step 3: Set the build step as execute shell.
Step 4: build the project.
react project was built successfully.