Skip to content

Commit 786c371

Browse files
authored
Merge pull request #6 from ControlSystemStudio/containerization
Create Dockerfile
2 parents b624820 + c413bd1 commit 786c371

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
target
2+
.classpath
3+
.project
4+
.settings
5+
.idea

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# syntax=docker/dockerfile:1
2+
3+
FROM eclipse-temurin:17-jdk AS builder
4+
WORKDIR /build
5+
RUN apt-get update && apt-get install -y maven && rm -rf /var/lib/apt/lists/*
6+
COPY . .
7+
RUN mvn --batch-mode --update-snapshots clean package -DskipTests
8+
9+
FROM eclipse-temurin:17-jre AS runner
10+
WORKDIR /app
11+
COPY --from=builder /build/target/pvws*.jar ./pvws.jar
12+
CMD ["java", "-jar", "/app/pvws.jar", "--spring.config.name=application"]

docker-compose.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
services:
3+
pvws:
4+
build:
5+
context: .
6+
dockerfile: Dockerfile
7+
image: pvws-springboot:latest
8+
network_mode: "host"
9+
environment:
10+
- EPICS_CA_AUTO_ADDR_LIST=YES
11+
- EPICS_PVA_AUTO_ADDR_LIST=YES

0 commit comments

Comments
 (0)