hongwenjun 0bf07a31c1 update 3 سال پیش
..
app 0bf07a31c1 update 3 سال پیش
Dockerfile 0bf07a31c1 update 3 سال پیش
README.md 0bf07a31c1 update 3 سال پیش
lolcat.gif 0bf07a31c1 update 3 سال پیش
lolcat.png 0bf07a31c1 update 3 سال پیش
lolcat.tgz 0bf07a31c1 update 3 سال پیش

README.md

Build

tar xf lolcat.tgz
docker build -t lolcat  .
docker run --rm -it  lolcat Dockerfile

Usage

docker run --rm -it -v $(pwd):/app/ \
    hongwenjun/lolcat  README.md

Dockerfile

Dockerfile

#    _          _           _
#   | |    ___ | | ___ __ _| |_
#   | |   / _ \| |/ __/ _` | __|
#   | |__| (_) | | (_| (_| | |_
#   |_____\___/|_|\___\__,_|\__|
#

FROM alpine:latest  AS builder
RUN  apk add ruby; gem install lolcat;   \
     apk del ca-certificates ruby-dev;    \
     rm -rf /usr/share/terminfo /usr/share/ca-certificates /var/cache /etc/ssl \
        /etc/terminfo /lib/libssl.so.1.1 /lib/libcrypto.so.1.1   \
        /usr/lib/ruby/gems/2.7.0/cache /usr/lib/ruby/2.7.0/x86_64-linux-musl/enc
             
FROM scratch
COPY --from=builder  .  .
ADD  ./app  /app
WORKDIR  /app

ENTRYPOINT ["lolcat"]

# docker build -t lolcat  .
# docker run --rm -it  lolcat -h
# docker run --rm -it  lolcat Dockerfile
# docker run --rm -it -v $(pwd):/app/ lolcat Dockerfile