Skip to content

Conversation

akash2237778
Copy link
Contributor

docker build was throwing following error:

 => ERROR [stage-3 4/4] RUN chmod g+rwx /var/cache/nginx /var/run /var/log/nginx &&     chown nginx.root /  0.3s
------
 > [stage-3 4/4] RUN chmod g+rwx /var/cache/nginx /var/run /var/log/nginx &&     chown nginx.root /var/cache/nginx /var/run /var/log/nginx &&     sed -i.bak 's/^user/#user/' /etc/nginx/nginx.conf &&     mkdir -p /etc/nginx/html/ && chmod 777 /etc/nginx/html/:
0.253 chown: unknown user nginx.root
------
Dockerfile:44
--------------------
  43 |     # support running as arbitrary user which belogs to the root group
  44 | >>> RUN chmod g+rwx /var/cache/nginx /var/run /var/log/nginx && \
  45 | >>>     chown nginx.root /var/cache/nginx /var/run /var/log/nginx && \
  46 | >>>     # comment user directive as master process is run as user in OpenShift anyhow
  47 | >>>     sed -i.bak 's/^user/#user/' /etc/nginx/nginx.conf && \
  48 | >>>     # Make /etc/nginx/html/ available to use
  49 | >>>     mkdir -p /etc/nginx/html/ && chmod 777 /etc/nginx/html/
  50 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c chmod g+rwx /var/cache/nginx /var/run /var/log/nginx &&     chown nginx.root /var/cache/nginx /var/run /var/log/nginx &&     sed -i.bak 's/^user/#user/' /etc/nginx/nginx.conf &&     mkdir -p /etc/nginx/html/ && chmod 777 /etc/nginx/html/" did not complete successfully: exit code: 1
exit status 1

Signed-off-by: Akäsh Säiñi <[email protected]>
Copy link

changeset-bot bot commented Aug 6, 2025

⚠️ No Changeset found

Latest commit: 023df90

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Aug 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
elixir-cloud-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 6, 2025 3:00pm

@akash2237778 akash2237778 changed the title Fix Dockerfile fix: Dockerfile | nginx.root user unknown Aug 6, 2025
@akash2237778 akash2237778 changed the title fix: Dockerfile | nginx.root user unknown fix: dockerfile nginx.root user unknown Aug 6, 2025
@anuragxxd anuragxxd merged commit c6842e5 into main Aug 6, 2025
11 of 15 checks passed
@anuragxxd anuragxxd deleted the fix-dockerfile branch August 6, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants