Skip to content

Commit

Permalink
(Combine with Docker) script to download qcow ONLY if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewQuijano committed Aug 5, 2024
1 parent dcb1b7d commit b49f4cb
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ ENV USER=${NAME}
# Copy dependencies lists into container. We copy them all and then do a mv because
# we need to transform base_image into a windows compatible filename which we can't
# do in a COPY command.
COPY ./wheezy_panda2.qcow2 /
COPY ./dependencies/* /tmp
COPY ./requirements.txt /tmp
COPY ./init-host.py /
Expand All @@ -25,6 +24,8 @@ COPY ./target_bins /target_bins
COPY ./target_configs /target_configs
COPY ./scripts /scripts
COPY ./tools/ /tools
RUN mkdir -p /target_injections
RUN bash download-qcow.sh

RUN mv /tmp/$(echo "$BASE_IMAGE" | sed 's/:/_/g')_build.txt /tmp/build_dep.txt && \
mv /tmp/$(echo "$BASE_IMAGE" | sed 's/:/_/g')_base.txt /tmp/base_dep.txt
Expand Down Expand Up @@ -69,9 +70,10 @@ RUN cmake -B"/tools/build" -H"/tools" -DCMAKE_INSTALL_PREFIX="/tools/install"
RUN make --no-print-directory -j4 install -C "/tools/build/lavaTool"
RUN make --no-print-directory -j4 install -C "/tools/build/fbi"

RUN useradd ${NAME}
RUN chown -R ${NAME}:${NAME} /tools/
RUN chown -R ${NAME}:${NAME} /scripts/
RUN chown -R ${NAME}:${NAME} /target_bins/
RUN chown -R ${NAME}:${NAME} /target_configs/
USER $NAME
#RUN useradd ${NAME}
#RUN chown -R ${NAME}:${NAME} /tools/
#RUN chown -R ${NAME}:${NAME} /scripts/
#RUN chown -R ${NAME}:${NAME} /target_bins/
#RUN chown -R ${NAME}:${NAME} /target_configs/
#RUN chown -R ${NAME}:${NAME} /target_injections/
#USER $NAME

0 comments on commit b49f4cb

Please sign in to comment.