Unverified Commit 379df4c3 by Enkelmann Committed by GitHub

change base image of dockerfile (#134)

parent e85a7f16
...@@ -5,32 +5,16 @@ WORKDIR /cwe_checker ...@@ -5,32 +5,16 @@ WORKDIR /cwe_checker
COPY . . COPY . .
RUN cargo build --release RUN cargo build --release
FROM phusion/baseimage:18.04-1.0.0 as runtime FROM fkiecad/ghidra_headless_base:9.2.1 as runtime
RUN apt-get -y update \ RUN apt-get -y update \
&& install_clean sudo \ && apt-get -y install sudo \
&& useradd -m cwe \ && useradd -m cwe \
&& echo "cwe:cwe" | chpasswd \ && echo "cwe:cwe" | chpasswd \
&& adduser cwe sudo \ && adduser cwe sudo \
&& sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers && sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers
USER cwe USER cwe
WORKDIR /home/cwe
ENV PATH="/home/cwe/.cargo/bin/:${PATH}"
ENV GHIDRA_VERSION="9.2.1_PUBLIC"
# Install Ghidra
RUN sudo apt-get -y update \
&& sudo install_clean \
curl \
unzip \
openjdk-11-jdk \
&& curl -fSL https://www.ghidra-sre.org/ghidra_9.2.1_PUBLIC_20201215.zip -o ghidra.zip \
&& unzip -q ghidra.zip \
&& sudo mv ghidra_${GHIDRA_VERSION} /opt/ghidra \
&& rm ghidra.zip
# Install all necessary files from the builder stage # Install all necessary files from the builder stage
COPY --from=builder /cwe_checker/target/release/cwe_checker /home/cwe/cwe_checker COPY --from=builder /cwe_checker/target/release/cwe_checker /home/cwe/cwe_checker
COPY --from=builder /cwe_checker/src/config.json /home/cwe/.config/cwe_checker/config.json COPY --from=builder /cwe_checker/src/config.json /home/cwe/.config/cwe_checker/config.json
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment