forked from vectordotdev/vector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhancement(docker platform): Added distroless-libc and distroless-st…
…atic docker container bases (vectordotdev#4236) Signed-off-by: Rick Richardson <[email protected]>
- Loading branch information
1 parent
0ddab1c
commit d645cae
Showing
4 changed files
with
51 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
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,17 @@ | ||
FROM debian:buster-slim AS builder | ||
|
||
COPY vector-*.deb ./ | ||
RUN dpkg -i vector-$(dpkg --print-architecture).deb | ||
|
||
FROM gcr.io/distroless/cc-debian10 | ||
|
||
COPY --from=builder /usr/bin/vector /usr/bin/vector | ||
COPY --from=builder /usr/share/doc/vector /usr/share/doc/vector | ||
COPY --from=builder /etc/vector /etc/vector | ||
VOLUME /var/lib/vector/ | ||
|
||
# Smoke test | ||
RUN ["vector", "--version"] | ||
|
||
ENTRYPOINT ["/usr/bin/vector"] | ||
|
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,17 @@ | ||
FROM debian:buster-slim AS builder | ||
|
||
WORKDIR /vector | ||
|
||
COPY vector-x86_64-unknown-linux-musl*.tar.gz ./ | ||
RUN tar -xvf vector-x86_64-unknown-linux-musl*.tar.gz --strip-components=2 | ||
|
||
FROM gcr.io/distroless/static | ||
|
||
COPY --from=builder /vector/bin/* /usr/local/bin/ | ||
COPY --from=builder /vector/config/vector.toml /etc/vector/vector.toml | ||
VOLUME /var/lib/vector/ | ||
|
||
# Smoke test | ||
RUN ["vector", "--version"] | ||
|
||
ENTRYPOINT ["/usr/local/bin/vector"] |
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