Spaces:
Running
Running
File size: 972 Bytes
95e0c4c 93613c3 f4224ab 93613c3 95e0c4c 93613c3 95e0c4c 93613c3 95e0c4c f4224ab 93613c3 95e0c4c 93613c3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
FROM nginx:alpine
# Install shadow package to get useradd command
RUN apk add --no-cache shadow
# Install wget
RUN apk add --no-cache wget
# Add a new user
RUN useradd -m -u 1000 user
# Set the working directory
WORKDIR /app
# Copy the HTML and nginx configuration files
COPY index.html /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
# Download test data
RUN wget https://github.com/andreped/wsi-visualization-demo/releases/download/sample-data/test-sample.zip \
&& unzip test-sample.zip -d /usr/share/nginx/html \
&& rm test-sample.zip
# Download OpenSeadragon
RUN wget https://github.com/openseadragon/openseadragon/releases/download/v5.0.0/openseadragon-bin-5.0.0.zip \
&& unzip openseadragon-bin-5.0.0.zip -d /usr/share/nginx/html \
&& rm openseadragon-bin-5.0.0.zip
RUN ls -la /usr/share/nginx/html
# Expose port 7860
EXPOSE 7860
# Start nginx as root but serve files as non-root user
CMD ["sh", "-c", "nginx -g 'daemon off;'"]
|