-
Notifications
You must be signed in to change notification settings - Fork 1
/
Earthfile
33 lines (24 loc) · 820 Bytes
/
Earthfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
VERSION 0.8
FROM python:3.11
build:
# Install poetry
RUN apt-get update && apt-get install -y curl
RUN curl -sSL https://install.python-poetry.org | python3 -
RUN ln -s /root/.local/bin/poetry /usr/local/bin/poetry
# Add files
COPY --dir zbuilder .
COPY poetry.lock pyproject.toml README.md .
# Install zbuilder
RUN poetry build
RUN pip3 install dist/zbuilder-*.whl
# Save for usage on docker
SAVE ARTIFACT /usr/local/lib/python3.11/site-packages
SAVE ARTIFACT /usr/local/bin/zbuilder
docker:
ARG reg=localhost
ARG tag=latest
ENV PYTHONPATH=/usr/lib/python3/site-packages
COPY +build/site-packages /usr/lib/python3/site-packages
COPY +build/zbuilder /usr/bin/zbuilder
CMD ["/usr/bin/zbuilder"]
SAVE IMAGE --push $reg/zbuilder:$tag