I don't have bat
on one of my servers, but I do have docker
so rather than trying to extract the files I was thinking of creating a simple docker image like
FROM alpine
RUN apk add --no-cache bat
ENTRYPOINT [ "/usr/bin/bat" ]
Then run it
docker run --rm -it -w /w -v ${PWD}:/w trajano/bat .bash_profile
But what if I want to do something like
docker run --rm -it -w /w -v ${PWD}:/w trajano/bat /etc/passwd
Is that possible?
I was thinking of something like changing the image to
FROM alpine
RUN apk add --no-cache bat
COPY bat.sh /bat
RUN chmod 700 /bat
ENTRYPOINT [ "/bat" ]
bat.sh
#!/bin/sh
/usr/bin/bat (some magic here)
Then run as
docker run --rm -it -v /:/host trajano/bat /etc/passwd
but not sure what that some magic here would look like