spotify/dockerfile-maven là một trong những repo hướng lập trình viên mà TopGit theo dõi, hiện có 2.7k sao, viết chủ yếu bằng Java. MATURE: A set of Maven tools for dealing with Dockerfiles
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
At this point, we're not developing or accepting new features or even fixing non-critical bugs.
This Maven plugin integrates Maven with Docker.
The design goals are:
Don't do anything fancy. Dockerfiles are how you build
Docker projects; that's what this plugin uses. They are
mandatory.
Make the Docker build process integrate with the Maven build
process. If you bind the default phases, when you type mvn package, you get a Docker image. When you type mvn deploy,
your image gets pushed.
Make the goals remember what you are doing. You can type mvn dockerfile:build and later mvn dockerfile:tag and later mvn dockerfile:push without problems. This also eliminates the need
for something like mvn dockerfile:build -DalsoPush; instead you
can just say mvn dockerfile:build dockerfile:push.
Integrate with the Maven build reactor. You can depend on the
Docker image of one project in another project, and Maven will
build the projects in the correct order. This is useful when you
want to run integration tests involving multiple services.
This project adheres to the Open Code of Conduct.
By participating, you are expected to honor this code.
See the changelog for a list of releases
Set-up
This plugin requires Java 7 or later and Apache Maven 3 or later (dockerfile-maven-plugin <=1.4.6 needs
Maven >= 3, and for other cases, Maven >= 3.5.2). To run the integration tests or to use the plugin in practice, a working
Docker set-up is needed.
Example
For more examples, see the integration test directory.
In particular, the advanced test showcases a
full service consisting of two micro-services that are integration
tested using helios-testing.
This configures the actual plugin to build your image with mvn package and push it with mvn deploy. Of course you can also say
mvn dockerfile:build explicitly.
FROM openjdk:8-jre
MAINTAINER David Flemström <[email protected]>
ENTRYPOINT ["/usr/bin/java", "-jar", "/usr/share/myservice/myservice.jar"]
# Add Maven dependencies (not shaded into the artifact; Docker-cached)
ADD target/lib /usr/share/myservice/lib
# Add the service itself
ARG JAR_FILE
ADD target/${JAR_FILE} /usr/share/myservice/myservice.jar
Important note
The most Maven-ish way to reference the build artifact would probably
be to use the project.build.directory variable for referencing the
'target'-directory. However, this results in an absolute path, which
is not supported by the ADD command in the Dockerfile. Any such source
must be inside the context of the Docker build and therefor must be
referenced by a relative path. See https://github.com/spotify/dockerfile-maven/issues/101
Do not use ${project.build.directory} as a way to reference your
build directory.
What does it give me?
There are many advantages to using this plugin for your builds.
Faster build times
This plugin lets you leverage Docker cache more consistently, vastly
speeding up your builds by letting you cache Maven dependencies in
your image. It also encourages avoiding the maven-shade-plugin,
which also greatly speeds up builds.
With the basic configuration, this will make sure that the image is
built and pushed at the correct times.
Depend on Docker images of other services
You can depend on the Docker information of another project, because
this plugin attaches project metadata when it builds Docker images.
Simply add this information to any project:
You can now use these projects with Fig or docker-compose or some
other system that works with Dockerfiles. For example, a
docker-compose.yml might look like:
spotify/dockerfile-maven thuộc nhóm Developer Tools trên TopGit, cùng 3 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về spotify/dockerfile-maven ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/spotify/dockerfile-maven là nguồn chính thức.
spotify/dockerfile-maven có bao nhiêu sao?
spotify/dockerfile-maven có 2.7k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/spotify/dockerfile-maven. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
spotify/dockerfile-maven có phải mã nguồn mở không?
Có — spotify/dockerfile-maven phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/spotify/dockerfile-maven.
spotify/dockerfile-maven còn đang phát triển không?
Commit gần nhất trên spotify/dockerfile-maven là 4.5 năm trước (theo timestamp GitHub). Repo có 476 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
spotify/dockerfile-maven dùng license gì?
spotify/dockerfile-maven phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
spotify/dockerfile-maven là gì?
spotify/dockerfile-maven (spotify/dockerfile-maven) là dự án Java trên GitHub. Theo mô tả gốc: MATURE: A set of Maven tools for dealing with Dockerfiles
spotify/dockerfile-maven viết bằng ngôn ngữ gì?
spotify/dockerfile-maven chủ yếu viết bằng Java. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về dockerfile-maven?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về dockerfile-maven.