Development Dependency Installation
When developing applications, we need to install some software or dependencies required for development in LCMD in advance, such as python, pip, unzip, etc.
There are 4 installation methods for you to choose from:
devshell Manual Installation
After entering the LCMD application container through devshell, you can directly execute commands to install
bash
apk add python3 py3-pip unzipapk add python3 py3-pip unzipBecause LCMD uses the alpine image, you need to use alpine's default package management tool apk to install software.
Define setupscript Installation Commands for Automatic Installation
- Configure the
setupscriptfield in lzc-build.yml. Every time you enter devshell, it will help you execute the script after thesetupscriptfield
yml
devshell:
setupscript:
apk add python3 py3-pip unzipdevshell:
setupscript:
apk add python3 py3-pip unzipDefine dependencies for Automatic Dependency Installation
- Configure the
dependenciesfield in lzc-build.yml, it will automatically help you install the specified dependencies
yml
devshell:
dependencies:
- python3
- py3-pip
- unzipdevshell:
dependencies:
- python3
- py3-pip
- unzipDefine Docker Image
- Configure the
imagefield in lzc-build.yml, it will automatically download the docker image
For example, specify the Go environment below:
yml
devshell:
image: registry.lazycat.cloud/golang:1.21.0-alpine3.18devshell:
image: registry.lazycat.cloud/golang:1.21.0-alpine3.18tip: After specifying image, dependencies will become invalid