Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build process fails #20

Open
CodeMonkeySteve opened this issue Jan 16, 2023 · 1 comment
Open

Build process fails #20

CodeMonkeySteve opened this issue Jan 16, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@CodeMonkeySteve
Copy link

Describe the bug
Build process fails with both Fedora and CentOS base iagmes

To Reproduce
Steps to reproduce the behavior:

  1. Run sudo ./setup.sh
  2. Select "Fedora 35" or "CentOS 8" base image
  3. Start build process
  4. See error

Expected behavior
Builds vaultwarden docker image

Desktop (please complete the following information):

  • OS: Fedora 36
  • Version: latest

Fedora 35 base image

sudo su - vaultwarden -c podman build -t fedora-vaultwarden:latest --build-arg admpass=HJKZffKtVBGA35as --build-arg OS=Fedora --build-arg HTTPS=443 -v /home/vaultwarden/.persistent_storage/vaultwarden:/var/lib/vaultwarden:Z -f /home/vaultwarden/.persistent_storage/project/Dockerfile
STEP 1/69: FROM scratch
STEP 2/69: LABEL maintainer="szfd9g <szfd9g@live.fr>"
STEP 3/69: ENV DISTTAG=f35container FGC=f35 FBR=f35 container=podman
STEP 4/69: ENV DNFOPTION="--setopt=install_weak_deps=False --nodocs"
STEP 5/69: ENV DB_BACKUP enabled
STEP 6/69: ENV LANG C.UTF8
STEP 7/69: ENV TERM=xterm
STEP 8/69: ARG admpass
STEP 9/69: ARG OS
STEP 10/69: ARG HTTPS
STEP 11/69: ADD layer.tar /
STEP 12/69: RUN printf "Create Vaultwarden user \n"     && adduser -u 10502 --shell /bin/bash --comment "Vaultwarden RS User Service" --user-group -m vaultwarden
Create Vaultwarden user
STEP 13/69: RUN printf "System update \n"     && dnf makecache     && dnf -y upgrade         dnf         rpm         yum         libmodulemd $DNFOPTION     && dnf -y upgrade $DNFOPTION
System update
Fedora 35 - x86_64                               22  B/s | 359  B     00:16
Errors during downloading metadata for repository 'fedora':
  - Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=fedora-35&arch=x86_64 (IP: 140.211.169.196)
  - Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=fedora-35&arch=x86_64 (IP: 38.145.60.21)
  - Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=fedora-35&arch=x86_64 (IP: 152.19.134.198)
Error: Failed to download metadata for repo 'fedora': Cannot prepare internal mirrorlist: Status code: 404 for https://mirrors.fedoraproject.org/metalink?repo=fedora-35&arch=x86_64 (IP: 152.19.134.198)
Error: building at STEP "RUN printf "System update \n"     && dnf makecache     && dnf -y upgrade         dnf         rpm         yum         libmodulemd $DNFOPTION     && dnf -y upgrade $DNFOPTION": while running runtime: exit status 1
Something goes wrong during build operation fedora-vaultwarden:latest

CentOS 8 base image
sudo su - vaultwarden -c podman build -t centos-vaultwarden:latest --build-arg admpass=HJKZffKtVBGA35as --build-arg OS=CentOS --build-arg HTTPS=443 -v /home/vaultwarden/.persistent_storage/vaultwarden:/var/lib/vaultwarden:Z -f /home/vaultwarden/.persistent_storage/project/Dockerfile
STEP 1/69: FROM scratch
STEP 2/69: LABEL maintainer="szfd9g szfd9g@live.fr"
STEP 3/69: ENV DISTTAG=f35container FGC=f35 FBR=f35 container=podman
STEP 4/69: ENV DNFOPTION="--setopt=install_weak_deps=False --nodocs"
STEP 5/69: ENV DB_BACKUP enabled
STEP 6/69: ENV LANG C.UTF8
STEP 7/69: ENV TERM=xterm
STEP 8/69: ARG admpass
STEP 9/69: ARG OS
STEP 10/69: ARG HTTPS
STEP 11/69: ADD layer.tar /
STEP 12/69: RUN printf "Create Vaultwarden user \n" && adduser -u 10502 --shell /bin/bash --comment "Vaultwarden RS User Service" --user-group -m vaultwarden
Create Vaultwarden user
STEP 13/69: RUN printf "System update \n" && dnf makecache && dnf -y upgrade dnf rpm yum libmodulemd $DNFOPTION && dnf -y upgrade $DNFOPTION
System update
CentOS Linux 8 - AppStream 105 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Error: building at STEP "RUN printf "System update \n" && dnf makecache && dnf -y upgrade dnf rpm yum libmodulemd $DNFOPTION && dnf -y upgrade $DNFOPTION": while running runtime: exit status 1
Something goes wrong during build operation centos-vaultwarden:latest

@CodeMonkeySteve CodeMonkeySteve added the bug Something isn't working label Jan 16, 2023
@mrc668
Copy link

mrc668 commented Apr 21, 2023

I will add that this is an issue for CentOS as well.

The build process runs as user vaultwarden.
Step 12 of the build process is to create the user vaultwarden.
Setp 13 of the build process is for the unprivileged user vaultwarden to update the system.
This is where the build process dies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants