Commit b994add0 authored by LAVENIER's avatar LAVENIER
Browse files

[fix] Fix docker image creation

parent f168b4da
Pipeline #12801 passed with stages
in 8 minutes and 3 seconds
FROM nginx:alpine
# Build arg
ARG NGINX_CONF=site.conf
ARG HTML=www
ARG USERNAME="nginx"
ARG GROUPNAME="nginx"
# nginx conf
COPY ${NGINX_CONF} /etc/nginx/conf.d/default.conf
RUN touch /var/run/nginx.pid && \
chown -R ${USERNAME}:${GROUPNAME} /var/run/nginx.pid && \
chown -R ${USERNAME}:${GROUPNAME} /var/cache/nginx
# Copy files
COPY --chown=${USERNAME}:${GROUPNAME} ${HTML} /usr/share/nginx/html
USER ${USERNAME}
# Port 80 is reserved for root user
EXPOSE 8080
server {
listen 8080;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment