-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Provide a docker image for running this command without installation #331
Comments
I understand that Docker images are provided for complicated programs like web servers, databases etc., but bat is really just a single binary executable. Wouldn't a Docker image be a little bit of overkill? 😄 |
While docker images are really helpful for complicated programs, I believe that they have also benefits for small programs. To list some:
This is somewhat in the spirit of Jessie Frazelle's 'docker containers on the desktop' (see https://blog.jessfraz.com/post/docker-containers-on-the-desktop/ or https://github.com/jessfraz/dockerfiles) - which I consider quite useful. So when I stumbled upon Not sure if this convinces you, let's see. I will build a docker image for myself anyway, if you like what I wrote above I can contribute the corresponding |
Interesting, thank you for the explanation and the references. Do you have any experience on what the runtime overhead would be?
That would be great, thanks! |
This could be a starting point: Dockerfile: FROM rust:1.29.1
WORKDIR /usr/src/bat
COPY . .
RUN cargo install
ENTRYPOINT ["bat"]
CMD [] > docker run -v $(pwd):/tmp bat --color=always /tmp/src/main.rs |
Just found this: https://hub.docker.com/r/danlynn/bat/ and https://github.com/danlynn/bat @danlynn Thank you for creating this! Would you mind if we reference your Docker image here in the README? |
@sharkdp Please feel free to reference the image. Love supporting your |
Oh! ...and I just released a docker image updated for bat 0.7.1 ;-) |
Thanks! |
Note that in my updated 0.7.1 image's README, that I recommend the following alias: alias bat='docker run -it --rm -e BAT_THEME -e BAT_STYLE -e BAT_TABS -v "$(pwd):/myapp" danlynn/bat' The docker instructions in your new README only passed the BAT_THEME env var (per my old README). So, if you want those additional env vars to be passed through, you might want to update your README. |
Updated. |
@sharkdp Was the instruction for Docker based installation removed or was it never there? |
It was there, but outdated. I don't really see the need for a Docker-based installation. It's also available on lots of different package managers. |
I find it quite useful on the console to run commands such as
bat
using docker - so that I don't need to install anything, and just have to pull the docker image when running the command for the first time.I could not find a docker image for
bat
- is there maybe already one that I missed? (If there is none, I could configure one and contribute the dockerfile to this repo, if wanted.)The text was updated successfully, but these errors were encountered: