Skip to content

Commit 81fdddf

Browse files
updated the docker image to use alpine for improved security.
1 parent dbd9e90 commit 81fdddf

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.github/workflows/docker-release.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: Build and Push Docker Image on Release
22

33
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
4+
release:
5+
types: [published]
86

97
env:
108
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: "${{secrets.DIGICERT_PKEY_PASSPHRASE}}"

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ WORKDIR /app
33
COPY . .
44
RUN mvn clean package -DskipTests
55

6-
FROM eclipse-temurin:17-jre
6+
FROM eclipse-temurin:17-jre-alpine
77
WORKDIR /app
88

9+
# Install the 'shadow' package to get groupadd and useradd
10+
RUN apk add --no-cache shadow
11+
912
# Create a non-root user to run the application
1013
RUN groupadd -r appgroup && useradd -r -g appgroup appuser
1114

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111
<groupId>com.contrast.labs.ai.mcp</groupId>
1212
<artifactId>mcp-contrast</artifactId>
13-
<version>0.0.4-SNAPSHOT</version>
13+
<version>0.0.4</version>
1414
<name>mcp-contrast</name>
1515
<description>MCP Server</description>
1616
<url/>

0 commit comments

Comments
 (0)