-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Dockerfile and dependencies required for container build [RHELDST…
…-1303] This commit introduces the Dockerfile required to build the container to be deployed on PSI. This commit also includes additional dependencies required to package and deploy exodus-gw on OpenShift PSI.
- Loading branch information
1 parent
ac273c3
commit a9875fd
Showing
5 changed files
with
129 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM registry.access.redhat.com/ubi8/ubi-minimal | ||
|
||
# Add sources | ||
COPY . /usr/local/src/exodus-gw/ | ||
|
||
# Install extra requirements specific to container deployment | ||
RUN \ | ||
# Install shadow-utils for adduser functionality | ||
microdnf -y install shadow-utils \ | ||
# Install extra commands needed for build | ||
&& microdnf -y install python3 python3-devel gcc make \ | ||
&& cd /usr/local/src/exodus-gw \ | ||
# Install application itself | ||
&& pip3 install --require-hashes -r requirements.txt \ | ||
&& pip3 install --no-deps . \ | ||
# Clean up unnecessary data | ||
&& microdnf clean all && rm -rf /var/cache/yum && rm -rf /usr/local/src/exodus-gw | ||
|
||
# Run as a non-root user | ||
RUN adduser exodus-gw | ||
USER exodus-gw | ||
|
||
# Enable communication via port 8080 | ||
EXPOSE 8080 | ||
|
||
# Run the application | ||
ENTRYPOINT ["uvicorn", "exodus_gw:application", "--host", "0.0.0.0", "--port", "8080"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ pydantic | |
starlette | ||
aioboto3 | ||
defusedxml | ||
uvicorn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[tox] | ||
envlist = py37, static, docs | ||
envlist = py36, static, docs | ||
|
||
[testenv] | ||
deps= | ||
|