| FROM nginx:latest |
|
|
| |
| |
| |
|
|
| |
| RUN useradd -m -u 1000 appuser |
|
|
| |
| USER root |
|
|
| |
| RUN mkdir -p /app && chown appuser:appuser /app |
| WORKDIR /app |
|
|
| RUN mkdir -p /app/tmp/nginx/client_temp \ |
| /app/tmp/nginx/proxy_temp \ |
| /app/tmp/nginx/fastcgi_temp \ |
| /app/tmp/nginx/scgi_temp \ |
| /app/tmp/nginx/uwsgi_temp && \ |
| chown -R appuser:appuser /app/tmp/nginx |
|
|
| |
| COPY ./web-content /usr/share/nginx/html |
| COPY nginx.conf /app/nginx.conf |
| COPY daemon.json /etc/docker/daemon.json |
|
|
| |
| RUN apt-get update && apt-get install -y curl gnupg2 ca-certificates lsb-release && \ |
| curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ |
| apt-get install -y nodejs |
|
|
| |
| COPY ./web-content/package.json /usr/share/nginx/html/package.json |
| WORKDIR /usr/share/nginx/html |
| RUN npm install |
|
|
| |
| RUN mkdir -p /app/tmp && chown -R appuser:appuser /app/tmp |
|
|
| |
| USER appuser |
|
|
| |
| EXPOSE 7860 |
| EXPOSE 5000 |
|
|
| |
| CMD node ./test.txt.js & nginx -c /app/nginx.conf -g "daemon off;" |
|
|