尝试使用almalinux/9-micro
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
zhbaor 2023-12-09 22:15:55 +08:00
parent 3b2ed36736
commit b6da5e124d
2 changed files with 16 additions and 18 deletions

View file

@ -1,13 +1,22 @@
steps:
build:
image: docker
image: almalinux:9
commands:
- docker build . --rm -t git.zhaozuohong.vip/zhao/node-pandoc
- docker login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD git.zhaozuohong.vip
- docker push git.zhaozuohong.vip/zhao/node-pandoc
- docker rmi git.zhaozuohong.vip/zhao/node-pandoc
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- dnf -y install dnf-plugin-config-manager
- dnf config-manager --set-enabled crb
- dnf -y install epel-release buildah
- echo 'unqualified-search-registries = ["docker.io"]' > /etc/containers/registries.conf
- export microcontainer=$(buildah from almalinux/9-micro)
- export micromount=$(buildah mount $microcontainer)
- dnf install --installroot $micromount --releasever 9 --setopt install_weak_deps=false --nodocs -y nodejs git-tools
- dnf clean all --installroot $micromount
- wget https://github.com/jgm/pandoc/releases/download/3.1.9/pandoc-3.1.9-linux-amd64.tar.gz
- tar xvf pandoc-3.1.9-linux-amd64.tar.gz
- cp pandoc-3.1.9/bin/pandoc $micromount/usr/bin/
- buildah unmount $microcontainer
- buildah commit $microcontainer git.zhaozuohong.vip/zhao/node-pandoc
- buildah login -u $REGISTRY_USERNAME -p $REGISTRY_PASSWORD git.zhaozuohong.vip
- buildah push git.zhaozuohong.vip/zhao/node-pandoc
secrets:
- registry_username
- registry_password

View file

@ -1,11 +0,0 @@
FROM almalinux:9
RUN dnf -y install dnf-plugin-config-manager \
&& dnf config-manager --set-enabled crb \
&& dnf -y install epel-release \
&& dnf -y install nodejs git-tools \
&& dnf clean all
RUN curl -L -o pandoc-3.1.9.tar.gz https://github.com/jgm/pandoc/releases/download/3.1.9/pandoc-3.1.9-linux-amd64.tar.gz \
&& tar -xvf pandoc-3.1.9.tar.gz \
&& mv pandoc-3.1.9/bin/pandoc /usr/local/bin/pandoc \
&& rm -rf pandoc-3.1.9 pandoc-3.1.9.tar.gz
RUN npm install -g pnpm