Skip to content
Snippets Groups Projects
Commit 9c42dca4 authored by Derek Hudson's avatar Derek Hudson
Browse files

Merge branch 'aws-fix-containerize' into 'master'

Fix containerize on GitLab.

See merge request !460

(cherry picked from commit be618388)

3302172b Fix containerize on GitLab.
788c8888 Now testing a Python virtual environment.
3c29b97f Made the image frozen.
7e4f0f9d Updating NOTICE
parent 4f19b793
No related branches found
No related tags found
1 merge request!461Merge branch 'aws-fix-containerize' into 'master'
Pipeline #231078 failed
...@@ -8,7 +8,7 @@ This software includes the following software and licenses: ...@@ -8,7 +8,7 @@ This software includes the following software and licenses:
======================================================================== ========================================================================
The following software have components provided under the terms of this license: The following software have components provided under the terms of this license:
- typing-extensions (from https://pypi.org/project/typing-extensions/4.4.0/, https://pypi.org/project/typing-extensions/4.8.0/) - typing-extensions (from https://pypi.org/project/typing-extensions/4.4.0/, https://pypi.org/project/typing-extensions/4.9.0/)
======================================================================== ========================================================================
Apache-2.0 Apache-2.0
...@@ -154,4 +154,4 @@ The following software have components provided under the terms of this license: ...@@ -154,4 +154,4 @@ The following software have components provided under the terms of this license:
- exceptiongroup (from https://pypi.org/project/exceptiongroup/1.0.1/, https://pypi.org/project/exceptiongroup/1.2.0/) - exceptiongroup (from https://pypi.org/project/exceptiongroup/1.0.1/, https://pypi.org/project/exceptiongroup/1.2.0/)
- portalocker (from https://github.com/WoLpH/portalocker) - portalocker (from https://github.com/WoLpH/portalocker)
- python-dateutil (from https://github.com/dateutil/dateutil) - python-dateutil (from https://github.com/dateutil/dateutil)
- typing-extensions (from https://pypi.org/project/typing-extensions/4.4.0/, https://pypi.org/project/typing-extensions/4.8.0/) - typing-extensions (from https://pypi.org/project/typing-extensions/4.4.0/, https://pypi.org/project/typing-extensions/4.9.0/)
...@@ -13,24 +13,28 @@ ...@@ -13,24 +13,28 @@
# limitations under the License. # limitations under the License.
# This Dockerfile assumes you used "make build" to convert the AdminUI to static files in frontend/adminui/dist/policyservice # This Dockerfile assumes you used "make build" to convert the AdminUI to static files in frontend/adminui/dist/policyservice
FROM public.ecr.aws/docker/library/alpine:latest FROM public.ecr.aws/docker/library/alpine:3.18.4
# set environment variables # set environment variables
# PYTHONDONTWRITEBYTECODE - Prevents Python from writing pyc files to disc (equivalent to python -B option) # PYTHONDONTWRITEBYTECODE - Prevents Python from writing pyc files to disc (equivalent to python -B option)
ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONDONTWRITEBYTECODE 1
# PYTHONUNBUFFERED - Prevents Python from buffering stdout and stderr (equivalent to python -u option) # PYTHONUNBUFFERED - Prevents Python from buffering stdout and stderr (equivalent to python -u option)
ENV PYTHONUNBUFFERED 1 ENV PYTHONUNBUFFERED 1
ENV PATH="/opt/.python/bin:${PATH}"
EXPOSE 8080/tcp EXPOSE 8080/tcp
RUN apk update && \ RUN apk update
apk upgrade RUN apk upgrade
RUN apk add gcc musl-dev linux-headers python3-dev RUN apk add gcc musl-dev linux-headers python3-dev
RUN apk add py3-pip RUN apk add py3-pip
WORKDIR /opt WORKDIR /opt
COPY ./app /opt COPY ./app /opt
RUN pip install --no-cache-dir --upgrade -r /opt/requirements.txt RUN python3 -m venv "/opt/.python/" --system-site-packages
RUN /opt/.python/bin/pip install --no-cache-dir --upgrade -r /opt/requirements.txt
RUN apk del gcc musl-dev linux-headers python3-dev RUN apk del gcc musl-dev linux-headers python3-dev
RUN apk --purge del apk-tools RUN apk --purge del apk-tools
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment