File tree Expand file tree Collapse file tree 5 files changed +866
-10
lines changed Expand file tree Collapse file tree 5 files changed +866
-10
lines changed Original file line number Diff line number Diff line change 1
- FROM python:3.12
1
+ # ##
2
+ # build compiled wheels
3
+ FROM python:3.12 as build
2
4
3
5
WORKDIR /
4
6
5
- COPY release_helper release_helper/
7
+ # setup poetry
8
+ RUN pip install --no-cache-dir poetry
6
9
7
- # setup python
8
- COPY requirements.txt .
9
- RUN pip install --no-cache- dir -r requirements.txt
10
+ COPY pyproject.toml .
11
+ RUN poetry export --format requirements.txt --without-hashes --output requirements.txt
12
+ RUN pip wheel --wheel- dir /wheels-base --requirement requirements.txt --debug --verbose
10
13
14
+
15
+ # ##
16
+ # final image
17
+ FROM python:3.12 as final
18
+
19
+ # copy python dependency wheels from build stage
20
+ COPY --from=build /wheels-base/ /wheels/
21
+
22
+ # use wheels to install python dependencies
23
+ RUN pip install --no-cache-dir --no-index --find-links=/wheels/ /wheels/* \
24
+ && rm -rf /wheels/
25
+
26
+ COPY release_helper/ /release_helper/
11
27
COPY entrypoint.sh .
12
28
13
29
ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change
1
+ services :
2
+
3
+ release_helper :
4
+ build :
5
+ args :
6
+ - revision=${GITHUB_SHA:-unknown}
7
+ context : .
8
+ labels :
9
+ org.opencontainers.image.revision : ${GITHUB_SHA:-unknown}
10
+ org.opencontainers.image.source : github.com/Noviconnect/release_helper
11
+ target : final
12
+ command : /entrypoint.sh
13
+ image : release_helper
You can’t perform that action at this time.
0 commit comments