-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.release
More file actions
42 lines (35 loc) · 1.35 KB
/
Copy pathDockerfile.release
File metadata and controls
42 lines (35 loc) · 1.35 KB
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
34
35
36
37
38
39
40
41
42
FROM ubuntu:24.04
ARG REQPACK_VERSION=dev
ARG VCS_REF=unknown
ARG REPO_URL=https://github.com/Coditary/ReqPack
LABEL org.opencontainers.image.title="ReqPack"
LABEL org.opencontainers.image.description="Portable ReqPack CLI runtime image"
LABEL org.opencontainers.image.source="${REPO_URL}"
LABEL org.opencontainers.image.url="${REPO_URL}"
LABEL org.opencontainers.image.revision="${VCS_REF}"
LABEL org.opencontainers.image.version="${REQPACK_VERSION}"
LABEL org.opencontainers.image.licenses="MIT"
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
tar \
&& rm -rf /var/lib/apt/lists/*
COPY rqp.tar.gz /tmp/rqp.tar.gz
RUN mkdir -p /opt/reqpack \
&& tar -xzf /tmp/rqp.tar.gz -C /opt/reqpack \
&& if [ -d /opt/reqpack/lib ]; then \
for bundled_lib in /opt/reqpack/lib/*; do \
[ -e "$bundled_lib" ] || continue; \
bundled_name="$(basename "$bundled_lib")"; \
if ldconfig -p 2>/dev/null | awk '{print $1}' | grep -Fx "$bundled_name" >/dev/null; then \
rm -f "$bundled_lib"; \
fi; \
done; \
fi \
&& chmod +x /opt/reqpack/rqp /opt/reqpack/bin/rqp.bin \
&& ln -sf /opt/reqpack/rqp /usr/local/bin/rqp \
&& rm -f /tmp/rqp.tar.gz
WORKDIR /workspace
ENTRYPOINT ["rqp"]