| |
|
|
| |
| FROM openresty/openresty:1.21.4.1-0-jammy |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| curl \ |
| vim \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN useradd -m -s /bin/bash myuser |
|
|
| |
| RUN mkdir -p /data/myapp |
| |
| RUN mkdir -p /usr/local/openresty/nginx |
|
|
| |
| RUN chown -R myuser:myuser /data/myapp |
| RUN chmod -R 755 /data/myapp |
| RUN chown -R myuser:myuser /usr/local/openresty/nginx |
| RUN chmod -R 755 /usr/local/openresty/nginx |
|
|
| |
| WORKDIR /data/myapp |
| |
| |
| USER myuser |
|
|
| |
| COPY app.lua /data/myapp/ |
| |
| |
| |
| COPY nginx.conf /usr/local/openresty/nginx/conf/nginx.conf |
|
|
| |
| CMD ["openresty", "-g", "daemon off;"] |
|
|