-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.runtime
More file actions
40 lines (33 loc) · 1.46 KB
/
Copy pathDockerfile.runtime
File metadata and controls
40 lines (33 loc) · 1.46 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
# Runtime image from a published Linux tarball (Plan.md REL-02).
# Does not compile LLVM. Pair with .github/workflows/docker-from-release.yml.
# Build context must contain retdec-linux-x64.tar.gz (renamed release asset)
# and fib_smoke (Release sample ELF).
FROM ubuntu:noble
LABEL org.opencontainers.image.source="https://github.com/odin-loki/RetDec-Decompiler"
LABEL org.opencontainers.image.description="RetDec runtime from the published Linux tarball"
LABEL org.opencontainers.image.licenses="MIT"
RUN apt-get update -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
openssl graphviz upx python3 ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m retdec
COPY retdec-linux-x64.tar.gz /tmp/retdec-linux-x64.tar.gz
COPY fib_smoke /tmp/fib_smoke
RUN tar xzf /tmp/retdec-linux-x64.tar.gz -C /opt && \
rm /tmp/retdec-linux-x64.tar.gz && \
root="$(find /opt -maxdepth 1 -type d -name 'retdec-*-linux-x64' | head -n1)" && \
test -n "${root}" && \
mv "${root}" /opt/retdec && \
test -x /opt/retdec/bin/retdec-decompiler && \
printf '%s\n' '#!/bin/sh' 'exec retdec-decompiler "$@"' \
> /opt/retdec/bin/analyse && \
chmod 755 /opt/retdec/bin/analyse && \
mkdir -p /opt/retdec/share /work && \
cp /tmp/fib_smoke /opt/retdec/share/fib_smoke && \
rm /tmp/fib_smoke && \
chmod 755 /opt/retdec/share/fib_smoke && \
chown -R retdec:retdec /opt/retdec /work
USER retdec
ENV HOME=/home/retdec
ENV PATH=/opt/retdec/bin:$PATH
WORKDIR /work