Better .dockerignore (#143)

This commit is contained in:
Nova Kwok 2022-08-13 10:52:58 +08:00 committed by GitHub
parent e5d5613502
commit 4d6fa9ef69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -3,7 +3,8 @@ exhaust/*
pics/*
remote-raw/*
scripts/*
.git/*
.git
.dockerignore
README.md
LICENSE
Makefile

View File

@ -10,11 +10,8 @@ COPY . /build
RUN cd /build && sed -i "s|.\/pics|${IMG_PATH}|g" config.json \
&& sed -i "s|\"\"|\"${EXHAUST_PATH}\"|g" config.json \
&& sed -i 's/127.0.0.1/0.0.0.0/g' config.json \
&& rm -rf .git \
&& go build -ldflags="-s -w" -o webp-server .
FROM alpine
COPY --from=builder /build/webp-server /usr/bin/webp-server