-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new Alpine-based Docker image.
This was adapted from PR #77. Co-authored-by: Thomas Munn <48925191+munntjlx@users.noreply.github.com>
- Loading branch information
1 parent
020e5fb
commit 6bf13dc
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
################################################################################ | ||
# Build `noseyparker` | ||
# | ||
# We use the alpine current, since it's smaller than most debian releases. | ||
################################################################################ | ||
FROM rust:1.72-alpine3.18 AS builder | ||
|
||
# Install dependencies | ||
RUN apk add --no-cache --no-interactive \ | ||
build-base \ | ||
cmake \ | ||
git \ | ||
make \ | ||
musl-dev \ | ||
ninja-build \ | ||
openssl \ | ||
openssl-dev \ | ||
perl \ | ||
zsh \ | ||
&& \ | ||
apk cache clean | ||
|
||
WORKDIR "/noseyparker" | ||
|
||
COPY . . | ||
|
||
RUN ./scripts/create-release.zsh && cp -r release /release | ||
|
||
################################################################################ | ||
# Build a smaller image just for running the `noseyparker` binary | ||
################################################################################ | ||
FROM alpine:3.18 as runner | ||
|
||
# Add `git` so that noseyparker's git and github integration works | ||
RUN apk add --no-cache --no-interactive git | ||
COPY --from=builder /release /usr/local/ | ||
|
||
# Tip when running: use a volume mount: `-v "$PWD:/scan"` to make for handling of paths on the command line | ||
WORKDIR "/scan" | ||
|
||
ENTRYPOINT ["noseyparker"] |