Skip to content

Commit 6cba66a

Browse files
committed
#598 update fastapi base image to use redhat ubi image for better CVE adaptment
1 parent a22d2f1 commit 6cba66a

File tree

3 files changed

+53
-2
lines changed

3 files changed

+53
-2
lines changed

DRAFT_RELEASE_NOTES.md

+4
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ To start your aiSSEMBLE upgrade, update your project's pom.xml to use the 1.11.0
8787
The hive service base image has been switched from `docker.io/eclipse-temurin:17-jre` to `registry.access.redhat.com/ubi9/openjdk-17-runtime:1.21`.
8888
Projects should update their Hive service Dockerfile or any related startup configuration script to use `microdnf` instead `apt-get` as the package manager if applicable
8989

90+
### For projects that have customized the FastAPI
91+
The fastapi base image has been switched from `docker.io/python:3.11` to `registry.access.redhat.com/ubi9/python-311:9.5`.
92+
There may be adjustments needed if applicable.
93+
9094
## Final Steps - Required for All Projects
9195
### Finalizing the Upgrade
9296
1. Run `./mvnw org.technologybrewery.baton:baton-maven-plugin:baton-migrate` to apply the automatic migrations

extensions/extensions-docker/aissemble-fastapi/pom.xml

+47
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,52 @@
2222
</plugin>
2323
</plugins>
2424
</build>
25+
<profiles>
26+
<profile>
27+
<id>integration-test</id>
28+
<build>
29+
<plugins>
30+
<plugin>
31+
<groupId>${group.fabric8.plugin}</groupId>
32+
<artifactId>docker-maven-plugin</artifactId>
33+
<executions>
34+
<execution>
35+
<id>test-image</id>
36+
<phase>integration-test</phase>
37+
<configuration>
38+
<images>
39+
<image>
40+
<run>
41+
<wait>
42+
<http>
43+
<url>http://localhost:8080</url>
44+
<method>GET</method>
45+
<status>200</status>
46+
</http>
47+
</wait>
48+
<ports>
49+
<port>8080:80</port>
50+
</ports>
51+
</run>
52+
</image>
53+
</images>
54+
</configuration>
55+
</execution>
56+
</executions>
57+
</plugin>
58+
<plugin>
59+
<groupId>org.codehaus.mojo</groupId>
60+
<artifactId>exec-maven-plugin</artifactId>
61+
<executions>
62+
<execution>
63+
<id>test-image-cleanup</id>
64+
<phase>post-integration-test</phase>
65+
</execution>
66+
</executions>
67+
</plugin>
68+
</plugins>
69+
</build>
70+
</profile>
71+
</profiles>
2572

2673
</project>

extensions/extensions-docker/aissemble-fastapi/src/main/resources/docker/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Script for creating base FastAPI Docker image
22

3-
FROM docker.io/python:3.11
3+
FROM registry.access.redhat.com/ubi9/python-311:9.5
44

55
LABEL org.opencontainers.image.source="https://github.com/boozallen/aissemble"
66

@@ -12,7 +12,7 @@ RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt
1212

1313
# Custom start script to run fastAPI with specific
1414
# module (defined using MODULE environment variable)
15-
COPY ./src/main/resources/docker/scripts/start.sh /start.sh
15+
COPY --chown=default:root ./src/main/resources/docker/scripts/start.sh /start.sh
1616
RUN chmod +x /start.sh
1717

1818
# Add FastAPI module

0 commit comments

Comments
 (0)