Skip to content

Commit ad537bd

Browse files
committed
Install from pre-built wheel in Docker to avoid needing git at build time
lsst-versions resolves the package version from git tags, but the Docker base image has no git binary. Building the wheel in CI (where git is available) bakes the version into the wheel; Docker then installs the wheel directly, bypassing the lsst-versions setuptools hook entirely. Generated with AI Co-Authored-By: SLAC AI
1 parent 4c32d12 commit ad537bd

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH"
88
# Put the latest pip and setuptools in the virtualenv
99
RUN pip install --upgrade --no-cache-dir pip setuptools wheel
1010

11-
COPY . /app
12-
WORKDIR /app
11+
COPY dist/ /dist/
1312

14-
# Install package
15-
RUN pip install --no-cache-dir .
13+
# Install pre-built wheel (avoids needing git at build time)
14+
RUN pip install --no-cache-dir /dist/*.whl
1615

1716
ENTRYPOINT ["sh", "-c"]
1817
CMD "syncAllSchemasToRegistry.py --help"

0 commit comments

Comments
 (0)