Skip to content

Instantly share code, notes, and snippets.

@kuanyui
Last active January 5, 2024 10:02
Show Gist options
  • Save kuanyui/d364b9844ef41bcc67a37c74ae813d77 to your computer and use it in GitHub Desktop.
Save kuanyui/d364b9844ef41bcc67a37c74ae813d77 to your computer and use it in GitHub Desktop.
Some notes for debian inside container
# 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"'
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