-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathDockerfile
30 lines (22 loc) · 991 Bytes
/
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
FROM ubuntu:latest
ARG TARGETARCH
# Set environment variables
ENV DECO_CLI_VERSION=1.20.1
ENV DECO_CLI_URL="https://releases.decodable.co/decodable-cli/linux/${TARGETARCH}/decodable-cli-linux-${TARGETARCH}-${DECO_CLI_VERSION}.tar.gz"
# Install necessary packages
RUN apt-get update && \
apt-get install -y curl tar && \
rm -rf /var/lib/apt/lists/*
# Download and unpack the Decodable CLI
RUN curl -L $DECO_CLI_URL -o /tmp/decodable-cli.tar.gz && \
tar -xzf /tmp/decodable-cli.tar.gz -C /tmp && \
mv /tmp/decodable-cli-linux-${TARGETARCH}-${DECO_CLI_VERSION}/bin/decodable /usr/local/bin && \
rm -r /tmp/decodable-cli.tar.gz /tmp/decodable-cli-linux-${TARGETARCH}-${DECO_CLI_VERSION}
# Copy the entrypoint script into the image
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
# Make the entrypoint script executable
RUN chmod +x /usr/local/bin/entrypoint.sh
# Verify installation
RUN decodable --version
# Set entrypoint
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]