I want to add a package in the alpline-linux environment set up with Docker. (This time, I want to put git
in the node container)
Use ʻapk` (Alpine's package manager).
update You can get the latest version from the package repository
$ apk update
search You can search for packages
$ apk search git
git-bash-completion-2.24.3-r0
git-cvs-2.24.3-r0
gitg-3.32.1-r2
libgit2-dev-0.28.5-r0
perl-git-svn-2.24.3-r0
gitolite-3.6.11-r0
libgit2-glib-0.28.0.1-r1
git-2.24.3-r0
...(Abbreviation)
add You can install the package
$ apk add git
Add ʻapk add to
RUN` of the existing Dockerfile.
FROM node:lts-alpine
WORKDIR /var/www/html
RUN apk update && \
npm install -g npm && \
apk add git #← Add
-Git installation when using alpine -Introduction to Alpine Linux -Package installation with internal structure and apk-
Recommended Posts