Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

jnuwan/docker-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

28 Commits

Repository files navigation

Based on the details retrieved, here's a README file for the docker-service repository:

# Docker Service
Docker and Jenkins test.
## Table of Contents
- [Overview](#overview)
- [Features](#features)
- [Technologies](#technologies)
- [Getting Started](#getting-started)
- [Usage](#usage)
- [Contributing](#contributing)
- [License](#license)
- [Contact](#contact)
## Overview
The `docker-service` is a test project designed to demonstrate the integration of Docker and Jenkins. It provides a simple setup for building, deploying, and testing a Java application using Docker and Jenkins.
## Features
- Docker containerization for the application.
- Jenkins pipeline for CI/CD.
- Automated build and deployment process.
- Simple Java application for demonstration purposes.
## Technologies
- **Programming Language**: Java
- **Containerization**: Docker
- **CI/CD**: Jenkins
- **Build Tool**: Maven
## Getting Started
### Prerequisites
- Docker installed on your machine
- Jenkins installed and running
- Java 11 or higher
- Maven
### Installation
1. Clone the repository:
 ```bash
 git clone https://github.com/jnuwan/docker-service.git
 cd docker-service
  1. Build the project using Maven:

    mvn clean install
  2. Build the Docker image:

    docker build -t docker-service .

Running the Application

To run the application inside a Docker container, use the following command:

docker run -p 8080:8080 docker-service

This will start the application and you can access it at http://localhost:8080.

Usage

Once the application is running, you can interact with it through the provided endpoints. Below are some example endpoints:

  • GET /api/hello: Returns a greeting message.
  • POST /api/data: Accepts and processes data.

CI/CD with Jenkins

The repository includes a Jenkinsfile that defines the CI/CD pipeline. To set up the pipeline in Jenkins:

  1. Create a new Jenkins job.
  2. Choose "Pipeline" and configure the SCM to point to this repository.
  3. Jenkins will automatically use the Jenkinsfile to define the pipeline stages.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Steps to Contribute

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature-branch).
  6. Open a pull request.

License

This project is not currently licensed under any specific license.

Contact


Feel free to customize the sections such as `Technologies` and `Contact` with specific details relevant to your project and personal information.

About

Docker and Jenkins test

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /