Giter Site home page Giter Site logo

Comments (4)

obsidianforensics avatar obsidianforensics commented on August 25, 2024 1

Thanks to both of you for your thoughts on this. I've used Docker very little, so I'll defer to whatever you think is best and be happy to merge it.

from unfurl.

weslambert avatar weslambert commented on August 25, 2024

Hi @OllieJC, and thanks for the suggestions.

I think the original way I had the Dockerfile and associated files were geared more towards my use case, so they may not have been optimized for quick testing, so thanks for the contributions there.

I don't think there would be any issue with the additional copies, but I'd be curious how much that adds size-wise via the additional layers, if at all.

Have you compared the size of the python:3-alpine-based image and alpine:3.10? I would think the Python image would be much larger, but I haven't tested it.

from unfurl.

OllieJC avatar OllieJC commented on August 25, 2024

Good point @weslambert about sizes! You're right with your thinking, the overall image size once built is ~42Mb larger.
In that case, something like this? This also forgoes the .git folder and docs folder for a little space saving.

FROM alpine:3.10

COPY requirements.txt /unfurl/requirements.txt

RUN apk update && apk add --no-cache git python3 && \
    if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
    if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
    pip3 install -r /unfurl/requirements.txt

COPY unfurl/ /unfurl/unfurl/
COPY *.py unfurl.ini /unfurl/
RUN sed -i 's/^host.*/host = 0.0.0.0/' /unfurl/unfurl.ini

WORKDIR /unfurl
ENTRYPOINT ["/usr/bin/python3", "unfurl_app.py"]

from unfurl.

weslambert avatar weslambert commented on August 25, 2024

Looks good to me! 👍 Thanks!

from unfurl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.