diff options
author | Jat | 2021-04-02 03:02:42 +0800 |
---|---|---|
committer | Jat | 2021-04-02 03:03:46 +0800 |
commit | e5be743490308615a5bc85a9160ecfec9a3d2b03 (patch) | |
tree | ac12123975b9d4cf33defa2bd230ffb6c26545da | |
parent | 9faf2269fd0226c2894169bd30ddbe04f31988bc (diff) | |
download | aur-e5be743490308615a5bc85a9160ecfec9a3d2b03.tar.gz |
add dockerfile
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Dockerfile | 36 | ||||
-rw-r--r-- | PKGBUILD | 6 | ||||
-rw-r--r-- | xorgxrdp-nvidia-git.install | 2 |
4 files changed, 38 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore index bd8b49c41f30..6e912d56ae85 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ !.SRCINFO !PKGBUILD !xorgxrdp-nvidia-git.install +!Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000000..a3f3a775790d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,36 @@ +FROM archlinux:latest AS build-stage + +RUN echo $'\ +Server = https://mirrors.aliyun.com/archlinux/$repo/os/$arch\n\ +Server = https://mirrors.cloud.tencent.com/archlinux/$repo/os/$arch\n\ +' > /etc/pacman.d/mirrorlist + +RUN echo $'\ +[archlinuxcn]\n\ +Server = https://mirrors.aliyun.com/archlinuxcn/$arch\n\ +Server = https://mirrors.cloud.tencent.com/archlinuxcn/$arch\n\ +' >> /etc/pacman.conf + +RUN pacman-key --init +RUN pacman -Syu archlinuxcn-keyring base-devel pacman-contrib namcap --needed --noconfirm +RUN pacman -S yay --needed --noconfirm + +RUN echo 'nobody ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers +RUN usermod -d /tmp nobody + +USER nobody +COPY --chown=nobody:nobody PKGBUILD xorgxrdp-nvidia-git.install /code/ +WORKDIR /code + +ENV ALL_PROXY=socks5h://host.docker.internal:1080 +RUN updpkgsums +RUN makepkg --printsrcinfo > .SRCINFO +RUN yay -S xrdp-git --needed --noconfirm +RUN makepkg -si --needed --noconfirm + +RUN pacman -Ql xorgxrdp-nvidia-git +RUN namcap PKGBUILD +RUN [ -z "$(namcap PKGBUILD 2>&1)" ] + +FROM scratch AS export-stage +COPY --from=build-stage /code/PKGBUILD /code/.SRCINFO / @@ -40,12 +40,6 @@ build() { make } -check() { - cd "$_pkgname" - - #make check -} - package() { cd "$_pkgname" diff --git a/xorgxrdp-nvidia-git.install b/xorgxrdp-nvidia-git.install index 223999c81dda..b98ad34590ba 100644 --- a/xorgxrdp-nvidia-git.install +++ b/xorgxrdp-nvidia-git.install @@ -5,7 +5,7 @@ echo -e '\033[1;33mxorgxrdp-nvidia only use the first gpu,' \ echo -e '\033[0;31mremember to edit "/etc/xrdp/sesman.ini",' \ 'change "param=xrdp/xorg.conf" to "param=xrdp/xorg_nvidia.conf"' \ -'in the section "[Xorg]"' +'in the section "[Xorg]".' echo -en '\033[0m' } |