Skip to content

Commit

Permalink
chore: Update ncdu Dockerfile to use Alpine instead of Debian and opt…
Browse files Browse the repository at this point in the history
…imize package installation
  • Loading branch information
dragonfire1119 committed Jul 19, 2024
1 parent 94099f8 commit 2e80ea3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
33 changes: 19 additions & 14 deletions ncdu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
FROM debian:latest
FROM golang:alpine as builder

# Install required packages
RUN apt-get update && apt-get install -y \
# Install necessary packages
RUN apk add --no-cache \
git \
vim

# Clone and build gotty
RUN git clone https://github.com/sorenisanerd/gotty.git /gotty && \
cd /gotty && \
go build

FROM alpine:latest

# Install ncdu, procps, curl, iproute2, and clean up
RUN apk add --no-cache \
ncdu \
procps \
curl \
iproute2 \
git \
golang-go \
vim \
&& apt-get clean

# Clone, build, and install gotty
RUN git clone https://github.com/sorenisanerd/gotty.git /tmp/gotty && \
cd /tmp/gotty && \
go build && \
mv gotty /usr/local/bin/ && \
cd / && \
rm -rf /tmp/gotty
&& rm -rf /var/cache/apk/*

# Copy the built gotty binary from the builder stage
COPY --from=builder /gotty/gotty /usr/local/bin/gotty

# Set the terminal to support UTF-8
ENV LANG C.UTF-8
Expand Down
2 changes: 1 addition & 1 deletion ncdu/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1
0.0.2

0 comments on commit 2e80ea3

Please sign in to comment.