Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix local-env issue of missing xfs user #7813

Merged
merged 5 commits into from
Jun 5, 2024
Merged

Fix local-env issue of missing xfs user #7813

merged 5 commits into from
Jun 5, 2024

Conversation

thelovekesh
Copy link
Collaborator

@thelovekesh thelovekesh commented Jun 5, 2024

Summary

As it can be seen in the latest CI runs - https://github.com/ampproject/amp-wp/actions/runs/9389955987/job/25858689875, the xfs user is no longer available in the container powered by alpine Linux, and resulting in error like:

RROR: for local-env_cli_1  Cannot start service cli: unable to find user xfs: no matching entries in passwd file

This PR adds a custom Docker image which extends wordpress image and installs the wp-cli binary in the image itself.

FROM wordpress

# WP CLI
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
	&& chmod +x wp-cli.phar \
	&& mv wp-cli.phar /usr/local/bin/wp

CMD ["apache2-foreground"]

Checklist

  • My code is tested and passes existing tests.
  • My code follows the Engineering Guidelines (updates are often made to the guidelines, check it out periodically).

Copy link
Contributor

github-actions bot commented Jun 5, 2024

Plugin builds for 14bfb80 are ready 🛎️!

Checksums
# Development build checksums
ba3a6639774a9bd33fc05adc15bb6d445af960ab5489fdecdc6400fafa99162d *amp.zip

# Production build checksums
99f8c33431992daebca7e9281c20ce0df5abf8578c0e5720518595fee5e86944 *amp.zip

Warning

These builds are for testing purposes only and should not be used in production.

@westonruter westonruter added this to the v2.5.4 milestone Jun 5, 2024
Comment on lines -12 to -17
# Check whether Node and NVM are installed
. "$(dirname "$0")/install-node-nvm.sh"

# Check whether Composer installed
. "$(dirname "$0")/install-composer.sh"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the CI runners already have these tools pre-installed, and we configure NodeJS and Composer in the CI.

For local development, I doubt if this is being used given we already have wp-env setup.

Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's over my head, but LGTM!

@thelovekesh
Copy link
Collaborator Author

E2E tests are running now - https://github.com/ampproject/amp-wp/actions/runs/9391104052/job/25862514993. I'll fix the failing tests in a different PR after merging dependabot PRs.

@thelovekesh thelovekesh merged commit f819f2c into develop Jun 5, 2024
23 of 25 checks passed
@thelovekesh thelovekesh deleted the fix/local-env branch June 5, 2024 21:05
@thelovekesh
Copy link
Collaborator Author

E2E tests are running as expected in local env. QA Passed ✅.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants