Skip to content

Instantly share code, notes, and snippets.

@Alistair1231
Last active May 1, 2023 19:54
Show Gist options
  • Save Alistair1231/bef47dd286bd77aff42698f6f891ae4d to your computer and use it in GitHub Desktop.
Save Alistair1231/bef47dd286bd77aff42698f6f891ae4d to your computer and use it in GitHub Desktop.
makedeb
FROM ubuntu:22.04
RUN apt update && apt install -y sudo wget gnupg2 git
# Add the makedeb repository and install the package
RUN wget -qO - 'https://proget.makedeb.org/debian-feeds/makedeb.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/makedeb-archive-keyring.gpg 1> /dev/null
RUN echo 'deb [signed-by=/usr/share/keyrings/makedeb-archive-keyring.gpg arch=all] https://proget.makedeb.org/ makedeb main' | sudo tee /etc/apt/sources.list.d/makedeb.list
RUN sudo apt update && sudo apt install -y makedeb
# Create the test folder
RUN mkdir /test
# Create a new user
RUN useradd -m temp && echo "temp:1234" | chpasswd && adduser temp sudo
# Copy the PKGBUILD file into the test folder
COPY PKGBUILD /test/
# Change ownership of the test folder and its contents to temp:temp
RUN chown -R temp:temp /test
# Set the working directory to the test folder
WORKDIR /test
# Switch to the temp user
USER temp
# run with
# docker build -t "makedeb-test" .
# docker run -it --rm makedeb-test /bin/bash
# then check with `makedeb -si` if it works, before you commit something with missing dependencies
# sudo password is 1234
# create packages https://docs.makedeb.org/using-the-mpr/uploading-packages/
# mine:
## https://mpr.makedeb.org/packages/dvtm-git
## https://mpr.makedeb.org/packages/abduco-git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment