mirror of
https://github.com/Jguer/yay.git
synced 2025-12-27 10:01:53 -05:00
* cleanup arch build * don't doubleptade * fix pacman-git build * fix final issues with some sandbox kernels * use quay because docker is out of steam * remove docker hub * -si on testing
41 lines
1.3 KiB
Docker
41 lines
1.3 KiB
Docker
FROM quay.io/gmanka/archlinuxarm:base-devel
|
|
LABEL maintainer="Jguer,docker@jguer.space"
|
|
|
|
ENV GO111MODULE=on
|
|
WORKDIR /app
|
|
|
|
COPY go.mod .
|
|
|
|
# asciidoc, doxygen, meson needed for pacman-git
|
|
RUN set -eux; \
|
|
pacman-key --init; \
|
|
pacman -Syu --noconfirm --needed pacman-contrib fish git-delta openssh bat go github-cli archlinux-keyring pacman go git gcc make base-devel sudo asciidoc doxygen meson; \
|
|
sed -i 's/^#DisableSandboxFilesystem/DisableSandboxFilesystem/' /etc/pacman.conf; \
|
|
sed -i 's/^#DisableSandboxSyscalls/DisableSandboxSyscalls/' /etc/pacman.conf; \
|
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v2.7.2; \
|
|
go mod download; \
|
|
rm -rf /var/lib/pacman/sync/* /var/cache/pacman/* /tmp/* /var/tmp/*; \
|
|
rm -rf /usr/share/man/* /usr/share/doc/* || true; \
|
|
yes | pacman -Scc >/dev/null 2>&1 || true
|
|
|
|
|
|
# Create a non-root user first
|
|
RUN useradd -m -s /bin/bash docker
|
|
|
|
# Set passwordless sudo for the docker user
|
|
RUN echo "docker ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/docker
|
|
|
|
# Switch to the docker user
|
|
USER docker
|
|
|
|
# Install xgotext
|
|
RUN go install github.com/leonelquinteros/gotext/cli/xgotext@latest
|
|
|
|
# Add /app/bin to the PATH
|
|
ENV PATH="/app/bin:/home/docker/go/bin:$PATH"
|
|
|
|
# Set the working directory
|
|
WORKDIR /workspace
|
|
|
|
# Command to run when starting the container
|
|
CMD ["fish"] |