Skip to content

Commit

Permalink
utils: docker: fixed some problems
Browse files Browse the repository at this point in the history
- out-of-tree (../build) working
- ramdisk working
- move package in kerneldir/SD
- building debs (here target is .. and need to be manually copied to SD-folder)
  i have not found way to move them without touching build.sh
  • Loading branch information
frank-w committed Aug 31, 2024
1 parent 041a7cc commit c380878
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
19 changes: 7 additions & 12 deletions utils/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#FROM ubuntu:bionic
#FROM ubuntu:focal
#FROM ubuntu:jammy
FROM ubuntu:noble

RUN useradd -ms /bin/bash builder

RUN apt-get update \
&& apt-get -y -q upgrade \
&& apt-get -y -q install \
Expand All @@ -26,13 +21,13 @@ RUN apt-get update \
libncurses-dev \
nano \
sudo \
kmod \
debhelper rsync cpio \
&& apt-get clean

RUN usermod -a -G sudo builder
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN usermod -aG sudo ubuntu && \
echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

RUN mkdir -p /srv/code && chmod a+rwx -R /srv

USER builder
#WORKDIR /srv/
WORKDIR /home/builder
RUN git clone --depth 1 https://www.github.com/frank-w/BPI-ROUTER-Linux --branch 6.6-main --single-branch code
RUN sed -i.bak -e 's/^\(ramdisksize\)/#\1/' code/build.conf
WORKDIR /srv/code
9 changes: 8 additions & 1 deletion utils/docker/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@
DIR=$(dirname "$(readlink -f "$0")")
REPO_DIR="$DIR/../.."

export UID=$(id -u)
export GID=$(id -g)

mkdir -p "$REPO_DIR/SD"
docker run --privileged -it -v "$REPO_DIR/SD":/SD -v "$REPO_DIR":/srv bpi-cross-compile:1 /bin/bash
docker run --privileged -it \
--user $UID:$GID \
-v "$REPO_DIR/SD":/srv/SD \
-v "$REPO_DIR":/srv/code \
bpi-cross-compile:1 /bin/bash

0 comments on commit c380878

Please sign in to comment.