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
This repository was archived by the owner on Oct 7, 2022. It is now read-only.

Commit 9e414b9

Browse files
committed
build: add multi-layered build
1 parent e1f0606 commit 9e414b9

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

‎Dockerfile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1-
FROM jboss/wildfly
1+
FROM maven:3.8.5-openjdk-11-slim AS maven
2+
FROM jboss/wildfly:25.0.0.Final AS wildfly
23

3-
COPY target/jax-rs-service-1.0.0.war /opt/jboss/wildfly/standalone/deployments/backend.war
4+
5+
FROM maven AS dependencies
6+
WORKDIR /backend
7+
COPY pom.xml .
8+
RUN mvn war:war install:install
9+
10+
11+
FROM dependencies AS build
12+
WORKDIR /backend
13+
COPY src src
14+
RUN mvn package
15+
16+
17+
FROM wildfly AS start
18+
COPY --from=build /backend/target/jax-rs-service-1.0.0.war /opt/jboss/wildfly/standalone/deployments/backend.war

0 commit comments

Comments
(0)

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