forked from python-gitlab/python-gitlab
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
Latest commit
19 lines (14 loc) · 525 Bytes
/
Copy pathDockerfile
File metadata and controls
19 lines (14 loc) · 525 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
ARG PYTHON_FLAVOR=alpine
FROM python:3.12-${PYTHON_FLAVOR} AS build
WORKDIR /opt/python-gitlab
COPY . .
RUN pip install --no-cache-dir build && python -m build --wheel
FROM python:3.12-${PYTHON_FLAVOR}
LABEL org.opencontainers.image.source="https://github.com/python-gitlab/python-gitlab"
WORKDIR /opt/python-gitlab
COPY --from=build /opt/python-gitlab/dist dist/
RUN pip install --no-cache-dir PyYaml
RUN pip install --no-cache-dir $(find dist -name *.whl) && \
rm -rf dist/
ENTRYPOINT ["gitlab"]
CMD ["--version"]