strapi-docker | Install and run your first Strapi project using Docker | REST library
kandi X-RAY | strapi-docker Summary
kandi X-RAY | strapi-docker Summary
API creation made simple, secure and fast. The most advanced open-source Content Management Framework to build powerful API with no effort.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Builds the mainline tags
- Build the stampi
- Run bootstrap .
- Builds all StrapiTags from the given node version
- Build the base docker image
- Build the base images
- Build the base git tags
- Gets the latest release version
- Execute docker
- Console log function
strapi-docker Key Features
strapi-docker Examples and Code Snippets
Community Discussions
Trending Discussions on strapi-docker
QUESTION
I'm in the process of learning about Docker by trying to containerify a Strapi CMS. The default Docker image (https://github.com/strapi/strapi-docker) works well enough as a starting point, but I'm trying to add a couple packages to the Strapi instance for my needs (adding in Azure storage account support using https://www.npmjs.com/package/strapi-provider-upload-azure-storage). As I'm new to Docker, I'm having a hard time figuring how to make the container install that package as part of the Docker run process.
I see that the strapi/base image Dockerfile contains this line referencing a package.json file:
COPY ./package.json ./
I'm assuming that's where I would add a reference to the packages I'm wanting to install so that later on they are installed by npm, but I'm not sure where that package.json file is located, let alone how to modify it.
Any help on figuring out how to install that package during the Docker run process is greatly appreciated!
...ANSWER
Answered 2020-Mar-30 at 19:49I figured out that strapi-docker uses a script to build images and not just the Docker files in the repo (bin/build.js). I also discovered that docker-entrypoint.sh is where the dependency installation is happening, so I added a couple of npm install statements after the check for the node_modules directory. Doing this allowed me to successfully add the desired packages to my Docker container.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install strapi-docker
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page