Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
Policy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU
OSDU Data Platform
Security and Compliance
Policy
Commits
7d640ee6
Commit
7d640ee6
authored
1 year ago
by
Shane Hutchins
Browse files
Options
Downloads
Patches
Plain Diff
AWS image update
parent
9c4ac38f
No related branches found
No related tags found
1 merge request
!482
Security, refactor and code cleanup
Pipeline
#254219
failed
1 year ago
Stage: review
Stage: build
Stage: containerize
Stage: scan
Stage: deploy
Stage: bootstrap
Stage: integration
Stage: publish
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/Dockerfile
+3
-7
3 additions, 7 deletions
app/Dockerfile
build/aws/build-aws/Dockerfile
+2
-1
2 additions, 1 deletion
build/aws/build-aws/Dockerfile
with
5 additions
and
8 deletions
app/Dockerfile
+
3
−
7
View file @
7d640ee6
# This Dockerfile assumes you used "make build" to convert the AdminUI to static files in frontend/adminui/dist/policyservice
FROM
python:3.9-slim-buster
# Run as user
RUN
adduser
--system
--group
nonroot
USER
nonroot
# set environment variables
# PYTHONDONTWRITEBYTECODE - Prevents Python from writing pyc files to disc (equivalent to python -B option)
ENV
PYTHONDONTWRITEBYTECODE 1
...
...
@@ -16,8 +12,8 @@ WORKDIR /opt
COPY
./app /opt
RUN
pip
install
--no-cache-dir
--upgrade
-r
/opt/requirements.txt
#
Admin UI
# Disabling until build passes
# COPY ./frontend/adminui/dist/policyservice /opt/assets
#
Run as user
RUN
adduser
--system
--group
nonroot
USER
nonroot
CMD
["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080", "--workers", "4", "--proxy-headers"]
This diff is collapsed.
Click to expand it.
build/aws/build-aws/Dockerfile
+
2
−
1
View file @
7d640ee6
...
...
@@ -40,7 +40,8 @@ RUN apk del gcc musl-dev linux-headers python3-dev
RUN
apk
--purge
del apk-tools
# Run as user
RUN
adduser
-D
nonroot
-G
nonroot
RUN
addgroup
-S
nonroot
\
&&
adduser
-D
nonroot
-G
nonroot
USER
nonroot
CMD
["uvicorn", "main:app", "--host", "0.0.0.0", "--workers", "4", "--port", "8080", "--proxy-headers"]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment