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

[docs] apt "Unable to locate package bruno" #1203

Open
nielsbom opened this issue Dec 11, 2023 · 6 comments
Open

[docs] apt "Unable to locate package bruno" #1203

nielsbom opened this issue Dec 11, 2023 · 6 comments
Labels
documentation Improvements or additions to documentation module-installation

Comments

@nielsbom
Copy link

nielsbom commented Dec 11, 2023

I'm writing a Dockerfile to install Bruno in a Debian container (because of #1030) but I get the following error on the apt-get install bruno instruction.

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package bruno

This is my Dockerfile:

FROM debian:11-slim

RUN apt-get update
RUN apt-get install -y --no-install-recommends \
  dumb-init \
  gpg \
  dirmngr \
  gpg-agent && \
  rm -rf /var/lib/apt/lists/*

RUN mkdir -p /etc/apt/keyrings 
RUN mkdir -m 700 -p /root/.gnupg
RUN gpg --no-default-keyring --keyring /etc/apt/keyrings/bruno.gpg --keyserver keyserver.ubuntu.com --recv-keys 9FA6017ECABE0266 

RUN echo "deb [signed-by=/etc/apt/keyrings/bruno.gpg] http://debian.usebruno.com/ bruno stable" | tee /etc/apt/sources.list.d/bruno.list 
 
RUN apt-get update 
RUN apt-get install -y --no-install-recommends bruno
# RUN grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* 
CMD ["dumb-init", "tail", "-f", "/dev/null"] # Helps debugging because it starts the container
# CMD ["bruno", "--help"] # Run something for debugging

When I run

grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/* 

I do see the Bruno package repository so I'm not sure why apt can't find it.

@nielsbom
Copy link
Author

I applied the suggested apt install changes from #1036.

@Nikolai2038
Copy link

Your Dockerfile worked for me, but I had to add -y to apt-get install bruno instruction, otherwise it will abort:

1.421 0 upgraded, 234 newly installed, 0 to remove and 0 not upgraded.
1.421 Need to get 191 MB of archives.
1.421 After this operation, 749 MB of additional disk space will be used.
1.421 Do you want to continue? [Y/n] Abort.
------
Dockerfile:18
--------------------
  16 |     
  17 |     RUN apt-get update
  18 | >>> RUN apt-get install bruno
  19 |     CMD ["dumb-init", "tail", "-f", "/dev/null"] # Helps debugging because it starts the container
  20 |     # CMD ["bruno", "--help"]
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get install bruno" did not complete successfully: exit code: 1

But I don't know if you could even run graphic app from a Docker container - when I run:

bruno --help

inside this container, I get:

bruno: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory

@nielsbom
Copy link
Author

Thanks for checking.

It could be my DNS... I use NextDNS to block ads and known bad hosts. I'll try without.

The dependency notice sounds fixable.

@nielsbom
Copy link
Author

Your Dockerfile worked for me, but I had to add -y to apt-get install bruno instruction, otherwise it will abort:

I've added this, also to the example above.
I tried it without my DNS-level host filtering. It still gives the same error.

But I don't know if you could even run graphic app from a Docker container

This should be possible with GUI apps, you do have to some X Server or VNC stuff tho. Other people have run Slack (also Electron) in a Docker container.

I now actually think it's because of my CPU architecture. I'm running an Apple Silicon chip (M3) and that uses the arm64 architecture/platform (same as Raspberry Pi).

Can you confirm that you don't run on arm64?

The bruno package repository only has amd64. So, I think, when apt tries to find a fitting package it looks for an arm64 version of the bruno package. And because it doesn't exist it gives the "Unable to locate package bruno" error.

It's possible to build Electron apps for arm64 as well and that already happens. But there's no build for Linux + arm64 that's published at http://debian.usebruno.com/ yet.

@Nikolai2038
Copy link

Yes, mine is amd64. You're right - I might be the case.

About GUI - I didn't know that, maybe look into it someday, thanks

@MichaelAndish
Copy link

MichaelAndish commented Mar 19, 2024

I'm using in this way, it works correctly

FROM node:lts-bookworm-slim
RUN npm install -g @usebruno/[email protected]

## Copy the collection files into the container
COPY bruno/tests ./app

## Set the working directory
WORKDIR /app

ENTRYPOINT ["bru"]
CMD ["run", "--env", "Local"]

Or this one

## Use a base image with Node.js pre-installed
FROM node:latest

# Install Bruno CLI globally
RUN npm install -g @usebruno/cli

## Copy the collection files into the container
COPY bruno/tests ./app

## Set the working directory
WORKDIR /app

CMD ["bru", "run", "--env", "Local"]

@sanjai0py sanjai0py added the documentation Improvements or additions to documentation label Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation module-installation
Projects
None yet
Development

No branches or pull requests

5 participants