mirror of
https://github.com/ericchiang/pup
synced 2025-01-28 08:31:26 +00:00
Add Dockerfile
This commit is contained in:
parent
681d7bb639
commit
30287da158
4
.dockerignore
Normal file
4
.dockerignore
Normal file
@ -0,0 +1,4 @@
|
||||
dist/
|
||||
testpages/*
|
||||
tests/test_results.txt
|
||||
robots.html
|
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
||||
FROM alpine:3.10 AS builder
|
||||
LABEL builder=true
|
||||
|
||||
ENV CGO_ENABLED=0
|
||||
ENV GOPATH /go
|
||||
|
||||
RUN apk add --update -t build-deps go git mercurial libc-dev gcc libgcc
|
||||
RUN go get github.com/ericchiang/pup \
|
||||
&& cd $GOPATH/src/github.com/ericchiang/pup \
|
||||
&& go build \
|
||||
-a \
|
||||
-ldflags '-s -w -extldflags "-static"' \
|
||||
-o /bin/pup
|
||||
RUN adduser -DH user
|
||||
|
||||
FROM scratch
|
||||
|
||||
ENTRYPOINT [ "/pup" ]
|
||||
CMD [ "--help" ]
|
||||
|
||||
COPY --from=builder /etc/passwd /etc/passwd
|
||||
USER user
|
||||
|
||||
COPY --from=builder /bin/pup /pup
|
11
README.md
11
README.md
@ -11,14 +11,21 @@ fast and flexible way of exploring HTML from the terminal.
|
||||
|
||||
Direct downloads are available through the [releases page](https://github.com/EricChiang/pup/releases/latest).
|
||||
|
||||
If you have Go installed on your computer just run `go get`.
|
||||
If you have Go installed on your computer just run `go get`:
|
||||
|
||||
go get github.com/ericchiang/pup
|
||||
|
||||
If you're on OS X, use [Homebrew](http://brew.sh/) to install (no Go required).
|
||||
If you're on OS X, use [Homebrew](http://brew.sh/) to install (no Go required):
|
||||
|
||||
brew install https://raw.githubusercontent.com/EricChiang/pup/master/pup.rb
|
||||
|
||||
If you have Docker installed, use the Docker image:
|
||||
|
||||
docker run --rm pup --help
|
||||
|
||||
# an alias makes it even shorter
|
||||
alias pup="docker run --rm pup"
|
||||
|
||||
## Quick start
|
||||
|
||||
```bash
|
||||
|
Loading…
Reference in New Issue
Block a user