Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile improvements, and and deployable version (comments and questions) #10

Open
duckontheweb opened this issue Aug 6, 2022 · 0 comments

Comments

@duckontheweb
Copy link
Contributor

Ported from stac-utils/stac-fastapi#379.

Original Issue:

I've made some improvements to the Dockerfile used for development in stac-fastapi-elasticsearch https://github.com/stac-utils/stac-fastapi-elasticsearch/blob/main/Dockerfile.dev

and created one that generates a deployable image https://github.com/stac-utils/stac-fastapi-elasticsearch/blob/main/Dockerfile.deploy

I can port these changes to here if desired.

A few of the concerns I had about the existing Dockerfile are:

I'm not sure why it uses a 2-phase build with no directives in the first phase?

FROM python:3.8-slim as base

FROM base as builder

I don't think we have any requirements that need building from source or need git:

# Any python libraries that require system libraries to be installed will likely
# need the following packages in order to build
RUN apt-get update && apt-get install -y build-essential git

This isn't used anywhere in our code, and I couldn't find any tools that require it:

ARG install_dev_dependencies=true

So it creates an /install dir, but then never uses it?

ENV PATH=$PATH:/install/bin

RUN mkdir -p /install && \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant