Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nsenter to Linux Periscope image #221

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions builder/Dockerfile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,22 @@ COPY . .

RUN go build ./cmd/aks-periscope

# Add dependencies for building nsenter
RUN apt-get update && \
apt-get install -y autoconf autopoint bison gettext libtool

# Create a statically-compiled nsenter binary (see: https://github.com/alexei-led/nsenter/blob/master/Dockerfile)
# nsenter versions: https://www.kernel.org/pub/linux/utils/util-linux/
ADD https://github.com/util-linux/util-linux/archive/v2.38.tar.gz .
peterbom marked this conversation as resolved.
Show resolved Hide resolved
RUN tar -xf v2.38.tar.gz && mv util-linux-2.38 util-linux
WORKDIR /build/util-linux
RUN ./autogen.sh && ./configure
RUN make LDFLAGS="--static" nsenter

# Runner
FROM $BASE_IMAGE

COPY --from=builder /build/aks-periscope /
COPY --from=builder /build/util-linux/nsenter /usr/bin/

ENTRYPOINT ["/aks-periscope"]