Last active
January 5, 2024 10:02
-
-
Save kuanyui/d364b9844ef41bcc67a37c74ae813d77 to your computer and use it in GitHub Desktop.
Some notes for debian inside container
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
# search package by name, print package name & version. | |
apt search --names-only node | perl -ne '/^([^\/\s]+)\S+\s+(\S+)/ && print "$1 \t\t\t\t $2\n"' |
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
FROM debian:bookworm | |
LABEL maintainer="ono@ono.tw" | |
SHELL ["/bin/bash", "-c"] | |
RUN useradd --create-home --shell /bin/bash user | |
RUN apt update && apt install --no-install-recommends --yes \ | |
iputils-ping \ | |
less \ | |
git \ | |
make \ | |
nodejs \ | |
npm \ | |
imagemagick \ | |
graphicsmagick \ | |
curl | |
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash | |
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
EXPOSE 8001/tcp | |
USER user | |
WORKDIR /home/user/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment