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

The docker-compose.yml don't work on Fedora 37 #230

Open
pidement opened this issue Mar 29, 2023 · 1 comment
Open

The docker-compose.yml don't work on Fedora 37 #230

pidement opened this issue Mar 29, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@pidement
Copy link

Describe the bug
On Fedora, I need to modify the docker-compose.yml file to work with SELinux.

Environment description

  • Installation environment: docker, docker-compose
  • I am using the default docker-compose.yaml file.
  • Fedora Linux 37 (Server Edition) x86_64

Steps to reproduce
To reproduce the issue, follow these steps:

  • Start with the environment described above.
  • Download and execute the default docker-compose.yml file.
  • Observe the following error:
hbbs    | [2023-03-29 11:41:13.876805 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs    | Error: An error occured while creating a new object: error returned from database: unable to open database file
hbbs    | [2023-03-29 11:41:14.435805 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs    | Error: An error occured while creating a new object: error returned from database: unable to open database file
hbbs    | [2023-03-29 11:41:14.979415 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs    | Error: An error occured while creating a new object: error returned from database: unable to open database file
hbbs    | [2023-03-29 11:41:15.708147 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs    | Error: An error occured while creating a new object: error returned from database: unable to open database file
hbbs    | [2023-03-29 11:41:16.840698 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs    | Error: An error occured while creating a new object: error returned from database: unable to open database file
hbbs    | [2023-03-29 11:41:18.766235 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs    | Error: An error occured while creating a new object: error returned from database: unable to open database file
hbbs    | [2023-03-29 11:41:22.287298 +00:00] INFO [src/peer.rs:84] DB_URL=./db_v2.sqlite3
hbbs    | Error: An error occured while creating a new object: error returned from database: unable to open database file
hbbs exited with code 1

My solution
I suggest adding :z at the end of the line for each volume in the docker-compose.yml file, like so:

  hbbs:
[...]
    volumes:
      - ./data:/root:z
[...]

  hbbr:
 [...]
    volumes:
      - ./data:/root:z
[...]

@pidement pidement added the bug Something isn't working label Mar 29, 2023
@JohnnyHua
Copy link

Same problem, it's due to the SELinux, according to me :z or :Z is the easiest way to solve. Modifying SELinux policies or security contexts may raise the risk in system security.

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

2 participants