Skip to content

Commit

Permalink
Move all the config file and scripts into conf/ folder. Use single CO…
Browse files Browse the repository at this point in the history
…PY command for all.
  • Loading branch information
alee-ntap committed Oct 31, 2023
1 parent 34a53ac commit 64fb1fc
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 12 deletions.
11 changes: 6 additions & 5 deletions build.containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG arch=amd64
# Stage 1: Build and install mini_sudo
FROM $arch/$image AS mini_sudo
WORKDIR /tmp
COPY mini_sudo.c ./
COPY misc/mini_sudo.c ./
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install \
--no-install-recommends -y gcc libc-dev \
Expand All @@ -17,14 +17,15 @@ FROM $arch/$image
WORKDIR /tmp

# Copy repository configration files for apt
COPY debian-src.sources local-pkgs.list /etc/apt/sources.list.d/
COPY local-pkgs /etc/apt/preferences.d/
COPY conf/ /
#COPY debian-src.sources local-pkgs.list /etc/apt/sources.list.d/
#COPY local-pkgs /etc/apt/preferences.d/

# Create a directory for local packages and touch the Packages file
RUN mkdir /pkgs && touch /pkgs/Packages

# Copy the package list file
COPY pkgs ./
#COPY pkgs ./

# Install packages from pkgs list and mark them as held, test gcc and cleanup
RUN apt-get update \
Expand All @@ -38,7 +39,7 @@ RUN apt-get update \
&& find /tmp -mindepth 1 -delete

# Copy the build scripts to /usr/local/bin
COPY build_source build_indep build_archdep build /usr/local/bin/
#COPY build_source build_indep build_archdep build /usr/local/bin/

# Copy mini_sudo from stage 1
COPY --from=mini_sudo /usr/local/bin/sudo /usr/local/bin/sudo
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions crossbuild.containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG target_arch=arm64v8
# Stage 1: Build and install mini_sudo
FROM $native_arch/$image AS mini_sudo
WORKDIR /tmp
COPY mini_sudo.c ./
COPY conf/ /
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install \
--no-install-recommends -y gcc libc-dev \
Expand All @@ -17,7 +17,7 @@ RUN apt-get update \
FROM $native_arch/$image AS native
ARG gnu_arch=aarch64
WORKDIR /tmp
COPY pkgs setup_native ./
#COPY pkgs setup_native ./
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install \
--no-install-recommends -y bbe patchelf \
Expand All @@ -30,11 +30,11 @@ FROM $target_arch/$image
WORKDIR /tmp

# Copy repository configration files for apt
COPY debian-src.sources local-pkgs.list /etc/apt/sources.list.d/
COPY local-pkgs /etc/apt/preferences.d/
#COPY debian-src.sources local-pkgs.list /etc/apt/sources.list.d/
#COPY local-pkgs /etc/apt/preferences.d/

# Install packages from pkgs list and mark them as held, test gcc
COPY pkgs ./
i#COPY pkgs ./
RUN mkdir /pkgs \
&& touch /pkgs/Packages \
&& apt-get update \
Expand All @@ -51,14 +51,14 @@ RUN mkdir /pkgs \
COPY --from=native /native /native

# Copy setup_native script and execute it
COPY setup_native ./
#COPY setup_native ./
RUN [ "/native/bash", "-c", "PATH=/native:$PATH ./setup_native import $(awk '{ print $1 }' pkgs)" ]

# Clean up /tmp
RUN find /tmp -mindepth 1 -delete

# Copy the build scripts to /usr/local/bin
COPY build_source build_indep build_archdep build /usr/local/bin/
#COPY build_source build_indep build_archdep build /usr/local/bin/

# Copy mini_sudo from stage 1
COPY --from=mini_sudo /usr/local/bin/sudo /usr/local/bin/sudo
Expand Down
File renamed without changes.

0 comments on commit 64fb1fc

Please sign in to comment.