This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dockerfile: Initial container definition
Here's an initial container definition. It's pretty general purpose at this point and just allows running the various commands in a containerized fashion.
- Loading branch information
1 parent
c0bede2
commit b738384
Showing
3 changed files
with
56 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.pyc |
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,35 @@ | ||
FROM fedora:27 | ||
|
||
RUN dnf install -y python2 python2-junit_xml beaker-client \ | ||
bison flex python2-mock dnf-plugins-core procps-ng | ||
RUN dnf builddep -y kernel | ||
|
||
# Use a default checkout of the kernel as our srcdir | ||
RUN git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git /work && \ | ||
chmod -R ugo+w /work | ||
|
||
# Setup a valid git config in the container | ||
RUN cd /work && \ | ||
git config user.email "[email protected]" && \ | ||
git config user.name "Sonic Kernel Testing" | ||
|
||
# Pull a default kernel config down for use in the container | ||
# It's expected that this will be overriden either by mounting a | ||
# new config file, or by adding one in a layered container | ||
RUN mkdir -p /var/src/config && \ | ||
curl -o /var/src/config/kernel-x86_64.config https://src.fedoraproject.org/rpms/kernel/raw/master/f/kernel-x86_64.config | ||
ENV SKT_BASECONFIG=/var/src/config/kernel-x86_64.config | ||
|
||
# Here's where our SKT work dir happens | ||
WORKDIR /work | ||
ENV SKT_WORKDIR=/work | ||
ENV SKT_BUILDDIR=/work/build | ||
RUN mkdir -p --mode=777 /work/build | ||
VOLUME [ "/work/build" ] | ||
|
||
# We don't pollute the container file system tree with | ||
# massive intermediate build output | ||
COPY . /var/src/skt | ||
RUN cd /var/src/skt && ls && pip install -v . | ||
|
||
ENTRYPOINT [ "/usr/bin/skt" ] |
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