-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #110 from hostmaster/patch-1
A few minor Dockerfile enhancements.
- Loading branch information
Showing
1 changed file
with
15 additions
and
12 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 |
---|---|---|
@@ -1,29 +1,32 @@ | ||
FROM golang:latest AS builder | ||
|
||
RUN apt update && \ | ||
apt install -y make wget llvm clang gcc git npm gulp libbpf-dev libpam0g-dev | ||
|
||
# syntax=docker/dockerfile:1 | ||
|
||
RUN ln -s /usr/include/$(uname -m)-linux-gnu/asm /usr/include/asm | ||
# hadolint ignore=DL3007 | ||
FROM golang:latest AS builder | ||
|
||
# hadolint ignore=DL3008 | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
make wget llvm clang gcc git npm gulp libbpf-dev libpam0g-dev && \ | ||
ln -s "/usr/include/$(uname -m)-linux-gnu/asm" /usr/include/asm | ||
|
||
WORKDIR /app | ||
COPY . . | ||
RUN make release | ||
|
||
# hadolint ignore=DL3007 | ||
FROM redhat/ubi9-minimal:latest | ||
|
||
|
||
RUN microdnf update -y && \ | ||
microdnf install -y iptables nc pam | ||
# hadolint ignore=DL3041 | ||
RUN microdnf update -y && \ | ||
microdnf install -y iptables nc pam && \ | ||
microdnf clean all | ||
|
||
WORKDIR /app/wag | ||
|
||
COPY --from=builder /app/wag /usr/bin/wag | ||
COPY docker_entrypoint.sh / | ||
RUN chmod +x /docker_entrypoint.sh /usr/bin/wag | ||
COPY --chmod=0777 docker_entrypoint.sh / | ||
|
||
VOLUME /data | ||
VOLUME /cfg | ||
|
||
CMD ["/docker_entrypoint.sh"] | ||
CMD ["/docker_entrypoint.sh"] |