-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathdockerfile
More file actions
36 lines (33 loc) · 1.11 KB
/
dockerfile
File metadata and controls
36 lines (33 loc) · 1.11 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
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app
# Install dependencies (keeping original tools)
RUN apt-get update && apt-get install -y \
software-properties-common \
curl \
unzip \
jq \
python3.12 \
python3.12-venv \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Download with better retry options but same structure
RUN LATEST_RELEASE_URL=$(curl -s --fail --retry 3 https://api.github.com/repos/cdisc-org/cdisc-rules-engine/releases/latest | jq -r '.assets[] | select(.name == "core-ubuntu-latest.zip") | .browser_download_url') \
&& echo "Downloading from: $LATEST_RELEASE_URL" \
&& curl -L \
--fail \
--retry 10 \
--retry-delay 5 \
--retry-max-time 1800 \
--retry-connrefused \
--retry-all-errors \
--connect-timeout 30 \
-C - \
-o core-ubuntu-latest.zip \
"$LATEST_RELEASE_URL" \
&& unzip core-ubuntu-latest.zip -d cdisc-rules-engine \
&& rm core-ubuntu-latest.zip \
&& mv cdisc-rules-engine/core/* . \
&& rm -rf cdisc-rules-engine \
&& chmod +x /app/core
CMD ["/bin/sh"]