Skip to content

Commit

Permalink
Merge pull request #454 from vobst/improve-docker-image-artificial_sa…
Browse files Browse the repository at this point in the history
…mples

Improve Docker image used for compiling artificial samples
  • Loading branch information
vobst authored Apr 3, 2024
2 parents d69cca6 + f64ad83 commit 7297cd5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions test/artificial_samples/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/*.out
build/*.o
10 changes: 6 additions & 4 deletions test/artificial_samples/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get -y update \
&& echo "cwe:cwe" | chpasswd \
&& adduser cwe sudo \
&& sed -i.bkp -e 's/%sudo\s\+ALL=(ALL\(:ALL\)\?)\s\+ALL/%sudo ALL=NOPASSWD:ALL/g' /etc/sudoers

USER cwe

RUN sudo apt-get install python3-pip apt-utils -y
Expand All @@ -17,8 +17,10 @@ RUN sudo pip3 install scons

ENV PATH="/home/cwe/.local/bin/:${PATH}"

COPY . /home/cwe/artificial_samples/
COPY --chown=cwe:cwe ./install_cross_compilers.sh .

WORKDIR /home/cwe/artificial_samples/
RUN ./install_cross_compilers.sh

RUN ./install_cross_compilers.sh
COPY --chown=cwe:cwe . /home/cwe/artificial_samples/

WORKDIR /home/cwe/artificial_samples/
3 changes: 3 additions & 0 deletions test/artificial_samples/install_cross_compilers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,7 @@ sudo apt install -y clang

sudo ln -s /usr/include/asm-generic /usr/include/asm

echo "Cleaning package index."
sudo apt-get clean && sudo rm -rf /var/cache/apt/archives /var/lib/apt/lists/*

echo "Done."

0 comments on commit 7297cd5

Please sign in to comment.