I would like to use a public docker container that has WordPress but also Node.js.
A previous developer had created a custom docker container that worked with our pipeline but we no longer have access to that image so need to either use a public one or create a custom one. If it has to be custom, I'm not sure what all would need to be in it.
Here is our pipeline (minus the reference to the docker image)
clone:
depth: full
pipelines:
branches:
deploy/dev:
- step:
max-time: 5
script:
- cd wp-content/themes/themename
- npm rebuild node-sass
- npm i
- npm run prod
- cd ../../../
- composer install --prefer-dist
- rm -rf .git
- rm .gitignore
- echo "node_modules/" > .gitignore
- git init .
- git add wp-content/themes
- git add wp-content/plugins
- git commit -q -m 'Automatic Deployment'
- git push -f git@git.wpengine.com:production/name_of_repo.git master
`
Thx for any guidance on this.
Hi @Alan G and welcome to the community!
I'm not aware of a public image that has both WordPress and Node.js, you could do a search in DockerHub and run locally on your machine containers based on different images to see if they have the tools you need preinstalled.
If you would like to build your own custom image, you can take a look at the resources we have here:
Based on your yml file, your build would need at least npm, composer, and git.
You could also debug your build locally with Docker using either an existing public image or a custom own that you create, to see if it's running ok with that specific image.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.