Reputation: 426
I'm trying to deploy an Angular application onto Openshift (i.e an angular docker container on Openshift). However, I'm facing difficulty modifying the default.conf
file within nginx in the container, which I think also caused the error at line 9.
Here's the error log on Openshift:
Here's my dockerfile:
FROM node:latest as build
WORKDIR /usr/local/app
COPY ./ /usr/local/app/
RUN npm install
RUN npm run build
FROM nginxinc/nginx-unprivileged
COPY --from=build /usr/local/app/dist/ng-adminx /usr/share/nginx/html
COPY --from=build /usr/local/app/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
For context,
I think chmod
or chown
might be the solution. Would greatly appreciate any suggestion on how I should modify my dockerfile or navigate this! Thanks!
Upvotes: 2
Views: 5080
Reputation: 21
You will need to use chmod
to be able to modify the default.conf file.
For simplicity, you can use chmod 777 <filepathname>
.
How does 777 come about? You can think of it as the permissions for read, write, execute for file owner, group and user respectively. 1 = allowed. 0 = not allowed.
So 7 in binary is 111.
file owner | group | other users |
---|---|---|
rwx | rwx | rwx |
111 | 111 | 111 |
Upvotes: 1