Skip to content

Commit

Permalink
Update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
j6k4m8 committed Feb 17, 2024
1 parent 1252184 commit 03f19a7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 27 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,11 @@
# CHANGELOG

### **v0.7.1** (February 17, 2024)

- Improvements
- Moved to a much smaller, alpine-based Dockerfile. Thanks @lsmoura!


### **0.7.0** (August 7 2023)

- Fixes
Expand Down
34 changes: 9 additions & 25 deletions Dockerfile
@@ -1,38 +1,22 @@
FROM alpine:3.12
FROM alpine:3.18

LABEL maintainer="Jordan Matelsky <goosepaper@matelsky.com>"
LABEL authors="Sergio Moura <sergio@moura.ca>"

RUN apk --update --no-cache add cairo libffi libjpeg libstdc++ libxml2 libxslt pango \
py3-aiohttp py3-cffi py3-feedparser py3-gobject3 py3-html5lib py3-lxml py3-multidict \
py3-numpy py3-requests py3-yarl ttf-dejavu

# Panda
ARG PANDAS_VERSION=1.1.5
RUN apk add --no-cache --virtual .build-deps curl build-base linux-headers py3-pip py3-numpy-dev python3-dev py3-setuptools && \
pip3 install cython && \
cd /tmp && \
curl -LO https://github.com/pandas-dev/pandas/releases/download/v${PANDAS_VERSION}/pandas-${PANDAS_VERSION}.tar.gz && \
tar zxf pandas-${PANDAS_VERSION}.tar.gz && \
cd pandas-${PANDAS_VERSION} && \
python3 setup.py build && \
python3 setup.py install --prefix=/usr && \
cd /tmp && \
rm -rf pandas-${PANDAS_VERSION}.tar.gz pandas-${PANDAS_VERSION} && \
pip3 uninstall -y cython && \
apk del .build-deps && \
rm -Rf /root/.cache
py3-aiohttp py3-cffi py3-feedparser py3-gobject3 py3-html5lib py3-lxml py3-multidict \
py3-numpy py3-requests py3-yarl ttf-dejavu

WORKDIR /app
COPY requirements.txt .
RUN apk add --no-cache --virtual .build-deps build-base git libxml2-dev libxslt-dev libffi-dev libjpeg-turbo-dev py3-pip py3-wheel python3-dev && \
pip3 install -r ./requirements.txt && \
apk del .build-deps && \
rm -Rf /root/.cache
pip3 install -r ./requirements.txt && \
apk del .build-deps && \
rm -Rf /root/.cache
COPY . .
RUN apk add --no-cache --virtual .install-deps py3-pip && \
pip3 install -e . && \
apk del .install-deps && \
rm -Rf /root/.cache
pip3 install -e . && \
apk del .install-deps && \
rm -Rf /root/.cache

ENTRYPOINT ["goosepaper"]
7 changes: 5 additions & 2 deletions setup.py
Expand Up @@ -4,7 +4,7 @@
from codecs import open as copen
from setuptools import setup, find_packages

__version__ = "0.7.0"
__version__ = "0.7.1"


here = path.abspath(path.dirname(__file__))
Expand Down Expand Up @@ -36,6 +36,9 @@
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
keywords=["remarkable", "tablet", "pdf", "news"],
packages=find_packages(exclude=["docs", "tests*"]),
Expand All @@ -49,5 +52,5 @@
author="Jordan Matelsky",
install_requires=install_requires,
dependency_links=dependency_links,
author_email="opensource@matelsky.com",
author_email="goosepaper@matelsky.com",
)

0 comments on commit 03f19a7

Please sign in to comment.