How to install packages on Alpine Linux

Thing you want to do

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)

Operating environment

manner

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

How to write in Dockerfile

Add ʻapk add toRUN` of the existing Dockerfile.

FROM node:lts-alpine

WORKDIR /var/www/html

RUN apk update && \
    npm install -g npm && \
    apk add git #← Add

reference

-Git installation when using alpine -Introduction to Alpine Linux -Package installation with internal structure and apk-

Recommended Posts

How to install packages on Alpine Linux
How to install VMware-Tools on Linux
How to install aws-session-manager-plugin on Manajro Linux
How to install Anisble on Amazon Linux 2
How to install php7.4 on Linux (Ubuntu)
How to install Camunda Modeler on Manjaro Linux
How to install Linux on a 32bit UEFI PC
[AWS EC2] How to install Maven on Amazon Linux 2
How to install git on Linux such as EC2
How to install mysql-connector-python on mac
How to install graph-tool on macOS
How to install wkhtmltopdf (Amazon Linux2)
How to install pycrypto on Windows
How to install OpenCV on Mac
How to install MBDyn (Linux Ubuntu)
How to install PyPy on CentOS
How to install TensorFlow on CentOS 7
How to install Maven on CentOS
How to install Go on Ubuntu
How to install music 21 on windows
How to install drobertadams / toggl-cli on Mac
How to update php on Amazon linux 2
How to display emoji on Manjaro Linux
5 reasons to install Linux on your laptop.
How to install richzhang / colorization on Windows 10
How to install Windows Subsystem For Linux
How to update security on CentOS Linux 8
How to install Apache (httpd) on CentOS7
How to install Eclipse GlassFish 5.1.0 on CentOS 7
How to install Apache (httpd) on CentOS8
How to find large files on Linux
How to install NumPy on Raspberry Pi
How to install cx_Oracle on macOS Sierra
How to install Python
How to install python
How to install Nbextensions
How to install Prover9
[2020 version] How to install Python3 on AWS EC2
How to install OpenCV on Jetson Nano Python
How to quickly install h5py on Windows 10 [Unofficial]
How to install OpenGM on OSX with macports
[Python] How to install OpenCV on Anaconda [Windows]
How to build Java environment on Ubuntu (Linux)
How to install / verify graphviz on anaconda / windows10
[2020.8 latest] How to install Python
How to install Python [Windows]
Install Linux on your Chromebox
How to use C216 Audio Controller on Arch Linux
Tabpy 1.0 (2020-01 version) How to install
How to install Git GUI and Gitk on CentOS
How to install caffe on OS X with macports
How to register on pypi
How to allow nologin users to log in on Linux
How to install mkl numpy
Install tomcat 5.5 on Amazon Linux.
How to install Pelican blog
Install Homebrew on Amazon Linux 2
Install strongSwan 5.9.1 on Amazon Linux 2
[Tips] How to use iPhone as webcam on Linux
How to build a Python environment on amazon linux 2
[AWS] How to expand disk space on Amazon linux