jpetazzo/nsenter hiện có 2.6k sao trên GitHub, viết chủ yếu bằng Shell.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Looking to start a shell inside a Docker container?
Starting from Docker 1.3 you can use Docker exec to enter a Docker container. Example:
docker exec -it CONTAINER_NAME /bin/bash
There are differences between nsenter and docker exec; namely, nsenter doesn't enter the cgroups, and therefore evades resource limitations. The potential benefit of this would be debugging and external audit, but for remote access, docker exec is the current recommended approach.
Important notice: this repository was useful in the early days of Docker, because nsenter was missing from major distributions back then. nsenter was written in early 2013, and included in util-linux release 2.23. If we look at Ubuntu LTS releases, trusty (14.04) shipped util-linux 2.20, and xenial (16.04) shipped 2.27. In other words, if you were using Ubuntu LTS, you had to wait until 2016 to get nsenter through the main, official packages. That being said, all modern distros now ship with nsenter, and this repository is no longer useful, except for historical or curiosity purposes. It is no longer maintained.
nsenter in a can
This is a small Docker recipe to build nsenter easily and install it in your
system.
What is nsenter?
It is a small tool allowing to enter into namespaces. Technically,
it can enter existing namespaces, or spawn a process into a new set of
namespaces. "What are those namespaces you're blabbering about?"
We are talking about container namespaces.
nsenter can do many useful things, but the main reason why I'm so
excited about it is because it lets you enter into a Docker container.
Why build nsenter in a container?
This is because my preferred distros (Debian and Ubuntu) ship with an
outdated version of util-linux (the package that should contain nsenter).
Therefore, if you need nsenter on those distros, you have to juggle with
APT repository, or compile from source, or… Ain't nobody got time for that.
I'm going to make a very bold assumption: if you landed here, it's because
you want to enter a Docker container. Therefore, you won't mind if my
method to build nsenter uses Docker itself.
How do I install nsenter with this?
If you want to install nsenter into /usr/local/bin, just do this:
docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter
The jpetazzo/nsenter container will detect that /target is a
mountpoint, and it will copy the nsenter binary into it.
If you don't trust me, and prefer to extract the nsenter binary,
rather than allowing my container to potentially wreak havoc into
your system's $PATH, you can also do this:
It's just a small shell script that wraps up the steps described above into
a tiny helper. It takes the name or ID of a container and optionally the name
of a program to execute inside the namespace. If no command is specified a
shell will be invoked instead.
# list the root filesystem
docker-enter my_awesome_container ls -la
Docker toolbox usage for OS X or Windows user
SSH to the Docker Toolbox virtual machine
docker-machine ssh default
Install nsenter, docker-enter, and importenv into the VM
docker run --rm -v /usr/local/bin:/target jpetazzo/nsenter
You can also install nsenter to another folder. In that case, you will
need to specify the full path of nsenter to run it.
docker run --rm -v /tmp:/target jpetazzo/nsenter
Using nsenter
List running containers:
docker ps
Identify the ID of the container that you want to get into; and retrieve
its associated PID:
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/jpetazzo/nsenter là nguồn chính thức.
jpetazzo/nsenter có bao nhiêu sao?
jpetazzo/nsenter có 2.6k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/jpetazzo/nsenter. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
jpetazzo/nsenter có phải mã nguồn mở không?
Có — jpetazzo/nsenter phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/jpetazzo/nsenter.
jpetazzo/nsenter có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho jpetazzo/nsenter. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
jpetazzo/nsenter có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho jpetazzo/nsenter. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
jpetazzo/nsenter còn đang phát triển không?
Commit gần nhất trên jpetazzo/nsenter là 6.2 năm trước (theo timestamp GitHub). Repo có 269 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc nsenter có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về nsenter.