0% found this document useful (0 votes)
9 views2 pages

PRACTICAL

Uploaded by

Vaishnavi Peddi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views2 pages

PRACTICAL

Uploaded by

Vaishnavi Peddi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

PRACTICAL

Experiment : 06
Here are some basic Docker commands that are commonly used for content
management:
. docker pull [image]: Download a Docker image from a registry.
○ Example: docker pull nginx

. docker build -t [name] [path]: Create a Docker image from a


Dockerfile.
○ Example: docker build -t myapp .

. docker run [options] [image]: Run a command in a new container.


○ Example: docker run -d -p 80:80 nginx

. docker ps: List running containers.


○ Use docker ps -a to see all containers, including stopped ones.

. docker stop [container]: Stop a running container.


○ Example: docker stop mycontainer

. docker rm [container]: Remove a stopped container.


○ Example: docker rm mycontainer

. docker rmi [image]: Remove an image from the local registry.


○ Example: docker rmi myapp

. docker exec [options] [container] [command]: Run a command in a


running container.
1
0
○ Example: docker exec -it mycontainer /bin/bash
9
. docker images: List all Docker images on the local system.
. docker volume ls: List all Docker volumes.
8
Experiment -07 :
Docker file : nano Dockerfile
7
– # Use the official Nginx image from the Docker Hub
– FROM nginx
6
– # Copy your HTML files into the container at the default Nginx location
– COPY . /usr/share/nginx/html
5
– # Expose port 80 (default for Nginx)
4
– EXPOSE 80
3
– # Start Nginx
– CMD ["nginx", "-g", "daemon off;"]
Docker build -t nginx .
2
Docker run -d -p 8082:80 nginx
Out put :
1
Experiment-05 :
To demonstrate continuous integration and development using Jenkins, follow
these steps:
. Install Jenkins: Download Jenkins from the official site and install it
on your server or computer.
. Start Jenkins: Launch Jenkins by starting the Jenkins service.
Usually, it runs on http://localhost:8080 by default.
. Install Required Plugins: In Jenkins, go to Manage Jenkins ->
Manage Plugins and install plugins like Git, GitHub, and Maven if
needed.
. Create a New Job: Go to Jenkins Dashboard, click on "New Item,"
enter an item name, select "Freestyle project," and click OK.
. Configure Job: In the job configuration:
○ Source Code Management: Select Git and provide the repository

URL.
○ Build Triggers: Enable "Poll SCM" or "Build when a change is

pushed to GitHub" to automate builds.


○ Build Environment: Set up the environment if needed.
○ Build: Add build steps, such as executing a shell script or running

Maven goals.
. Add Post-build Actions: Set up actions like sending build
notifications or deploying artifacts.
. Save and Build: Save the job configuration and click "Build Now" to
start the build process.
. Monitor Build Process: View the build status and console output in
Jenkins to ensure everything runs smoothly.

By following these steps, you integrate Jenkins into your development


workflow, automating testing and deployment processes, thus streamlining
continuous integration and development.
1.

You might also like