Giter VIP home page Giter VIP logo

hello-jenkins's Introduction

Follow step

1. Code application

2. Writing a Dockerfile

3. Building the image locally

docker build . -t name_image:v1

Running the image locally

docker run -d -it -p 3000:3000 name_image:v1

Check if the server responds in your local port 3000

curl http://127.0.0.1:3000

4: Building the image in Jenkins

Docker image can be built, we’ll want to do it automatically every time there is a change to the application code.

Pipelines as code: The Jenkinsfile

Build project using docker (Dockerfile)

Deploy project using jenkins (Jenkinsfile)

alt text

Write a Jenkins Pipeline specification in a Jenkinsfile.

Now, we’ll just need to tell Jenkins two things:

  1. Where to find our code
  2. What credentials to use to publish the Docker image

Configuring Docker Hub with Jenkins

Start jenkins

docker run -it -d --name myjenkins -p 8080:8080 -p 50000:50000 -v /var/jenkins_home jenkins/jenkins

Reference: https://tutorials.releaseworksacademy.com/learn/building-your-first-docker-image-with-jenkins-2-guide-for-developers

hello-jenkins's People

Watchers

James Cloos avatar Duy Quoc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.