Help with docker image for Pipeline for a WordPress site

Alan G
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 13, 2023

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.

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 15, 2023

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events