forked from criblio/appscope
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
021aee9
commit f1f5c38
Showing
3 changed files
with
78 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
|
||
ARG IMAGE=riscv64/ubuntu:23.04 | ||
FROM $IMAGE | ||
|
||
# These are needed to bypass the prompts when tzdata is installed. | ||
ENV DEBIAN_FRONTEND="noninteractive" | ||
ENV TZ="America/New_York" | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
|
||
# --- | ||
# Install packages. Note extra PPA for Go. | ||
# | ||
# Also note that this logic duplicates the top-level `install_build_tools.sh` | ||
# script. Trying to use that script here causes issues because of its use of | ||
# `sudu` when running the package installer. It clears the environment so the | ||
# additions above don't apply and we end up with interaction when some of the | ||
# dependencies (i.e. tzdata) are installed. | ||
# | ||
RUN apt-get update && \ | ||
apt-get install -y software-properties-common gpg apt-utils libelf-dev && \ | ||
add-apt-repository ppa:longsleep/golang-backports && \ | ||
apt-get update && \ | ||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 52B59B1571A79DBC054901C0F6BC817356A3D45E && \ | ||
apt-get install -y \ | ||
autoconf \ | ||
automake \ | ||
build-essential \ | ||
cmake \ | ||
curl \ | ||
emacs \ | ||
gdb \ | ||
git \ | ||
golang-go \ | ||
lcov \ | ||
libtool \ | ||
lsof \ | ||
make \ | ||
strace \ | ||
sudo \ | ||
tzdata \ | ||
&& \ | ||
dpkg-reconfigure --frontend noninteractive tzdata && \ | ||
apt-get clean | ||
|
||
RUN useradd -d /home/builder -m builder && \ | ||
useradd -d /home/builder -m builder1 && \ | ||
\ | ||
echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/builder && \ | ||
echo "builder1 ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/builder && \ | ||
\ | ||
echo "alias ll='ls -alF'" >> /home/builder/.bashrc && \ | ||
echo "alias la='ls -A'" >> /home/builder/.bashrc && \ | ||
echo "alias l='ls -CF'" >> /home/builder/.bashrc && \ | ||
echo "alias h='history'" >> /home/builder/.bashrc && \ | ||
\ | ||
echo "#set environment LD_PRELOAD=/home/builder/appscope/lib/linux/libscope.so" >> /home/builder/.gdbinit && \ | ||
echo "set follow-fork-mode child" >> /home/builder/.gdbinit && \ | ||
echo "set breakpoint pending on" >> /home/builder/.gdbinit && \ | ||
echo "set directories /home/builder/appscope" >> /home/builder/.gdbinit && \ | ||
\ | ||
mkdir /home/builder/appscope | ||
|
||
# --- | ||
# The local git clone of the project is mounted as /home/builder/appscope. See Makefile. | ||
# | ||
# docker run -v $(pwd):/home/builder/appscope ... | ||
# | ||
WORKDIR /home/builder/appscope | ||
|
||
# fini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters