forked from t3rn/executor-release
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
33 lines (25 loc) · 1.04 KB
/
Dockerfile
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
# Use a minimal base image
FROM debian:bullseye-slim
# Application version
ARG APP_VERSION=v0.42.0
# Set working directory
WORKDIR /app
# Install necessary tools and clean up
RUN apt-get update && \
apt-get install -y --no-install-recommends \
wget \
ca-certificates \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Download and extract the executor binary using the version variable
RUN wget https://github.com/t3rn/executor-release/releases/download/${APP_VERSION}/executor-linux-${APP_VERSION}.tar.gz \
&& tar -xzf executor-linux-${APP_VERSION}.tar.gz \
&& rm executor-linux-${APP_VERSION}.tar.gz
# Move the binary to a standard location and make it executable
# Find the actual executable and make it executable
RUN find . -type f -name "executor" -exec chmod +x {} \;
# Store the executable path
RUN find . -type f -name "executor" | head -n 1 > executable_path.txt
# Use the executable path in the entrypoint
ENTRYPOINT ["/bin/sh", "-c", "$(cat executable_path.txt)"]
# Default command (can be overridden)
CMD ["--help"]