-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* simplifying docker build * demo on pythonanywhere.com * upgrade to duckdb 0.10.0 to fix cve * fix cve HIGH CVE-2024-24762 -- pkg:pypi/fastapi@0.101.0 HIGH CVE-2024-26130 -- pkg:pypi/cryptography@42.0.1 HIGH CVE-2024-24762 -- pkg:pypi/starlette@0.27.0 * fix cve HIGH CVE-2024-24762 -- pkg:pypi/starlette@0.35.1 * fix cve CRITICAL CVE-2024-22682 --pkg:pypi/duckdb@0.9.0 * upgrade duckdb CVE-2024-22682--pkg:pypi/duckdb@0.9.0 * o-updated readme o-configuring secrets no longer required due to presence of secretmanager in duckdb * build arm64 --------- Co-authored-by: vishnu chanderraju <vishnu.ch@cuezen.com>
- Loading branch information
1 parent
d936f6c
commit 9d3022f
Showing
13 changed files
with
229 additions
and
255 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 |
---|---|---|
@@ -1,27 +1,46 @@ | ||
# Use an official Python runtime as a parent image | ||
ARG DOCKER_DUCKX_IMAGE_VERSION | ||
FROM jaihind213/duckdbx:${DOCKER_DUCKX_IMAGE_VERSION} | ||
FROM ubuntu:22.04 | ||
LABEL maintainer="jaihind213@gmail.com" | ||
|
||
USER 0 | ||
RUN mkdir -p /radio-duck | ||
WORKDIR /radio-duck | ||
ARG PYTHON_VERSION=3.10 | ||
ENV LANG C.UTF-8 | ||
ENV LC_ALL C.UTF-8 | ||
|
||
RUN useradd -m -d /home/radio-duck radio-duck | ||
WORKDIR /home/radio-duck | ||
RUN mkdir "pond" | ||
|
||
RUN apt update && apt autoclean && apt install -y software-properties-common && apt update && add-apt-repository ppa:apt-fast/stable -y && add-apt-repository ppa:deadsnakes/ppa && apt update && apt install -y apt-fast | ||
RUN apt-fast -y install linux-libc-dev libssl-dev | ||
#RUN apt-fast -y install gcc git g++ libblis64-3-pthread | ||
RUN apt-fast -y install libblis64-3-pthread | ||
|
||
RUN apt-fast update && apt-fast install -y python${PYTHON_VERSION} | ||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 | ||
|
||
#for psutil need to do python3.10-dev u need it later when u do '' pip3 install -r requirements-dev.txt'' | ||
RUN apt-fast -y install python${PYTHON_VERSION}-dev | ||
RUN apt-fast -y install curl && curl -sS https://bootstrap.pypa.io/get-pip.py | python3 && apt-fast -y remove curl | ||
|
||
# Copy the current directory contents into the container at /app | ||
COPY . /radio-duck/ | ||
COPY default.ini /radio-duck/default.ini | ||
COPY *.py /home/radio-duck | ||
COPY requirements.txt /home/radio-duck | ||
COPY default.ini /home/radio-duck/default.ini | ||
# Install any needed packages specified in requirements.txt | ||
RUN pip3 install --no-cache-dir -r requirements.txt | ||
|
||
RUN --mount=type=secret,id=duck_sekrets | ||
#RUN rm -f /etc/ssl/certs/ca-bundle.crt && apt update && apt install --reinstall ca-certificates && update-ca-certificates | ||
RUN echo "base docker image version: $DOCKER_DUCKX_IMAGE_VERSION" >> base_docker_image_version | ||
|
||
RUN mkdir "/quack" | ||
RUN echo "import duckdb; duckdb.query('install httpfs; load httpfs; install azure; load azure;');" >> /quack/test.py && echo "" >> /quack/test.py | ||
RUN cd /quack && python3 test.py && cd - | ||
|
||
#RUN echo http://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories | ||
#RUN apk update && apk add --no-cache zlib-dev==1.3-r2 #->for docker CRITICAL CVE-2023-45853 | ||
# Make port 8000 available to the world outside this container | ||
EXPOSE 8000 | ||
|
||
# Run server.py when the container launches | ||
CMD ["python3", "/radio-duck/server.py"] | ||
CMD ["python3", "/home/radio-duck/server.py"] | ||
|
||
VOLUME /radio-duck/pond | ||
VOLUME /home/radio-duck/pond |
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
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 was deleted.
Oops, something went wrong.
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
File renamed without changes.
File renamed without changes.
Oops, something went wrong.