Skip to content

Commit

Permalink
chore:removed vulenrablity issue from webapp image (#1968)
Browse files Browse the repository at this point in the history
  • Loading branch information
rnithinpaladin authored Dec 19, 2023
1 parent 6f65b14 commit 50003ab
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions installer/resources/pacbot_app/files/ui_docker/dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
FROM nginx:1.21.6
# Use the official Nginx image with a specific version
FROM nginx:1.25.3-alpine

LABEL maintainer="NGINX Docker Maintainers <[email protected]>"

ARG HTML_FILE
ENV HTML_FILE=$HTML_FILE

# Install required packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
RUN apk update && \
apk upgrade && \
apk add --no-cache \
curl \
python3 \
python3-distutils \
unzip \
gnupg \
&& rm -rf /var/lib/apt/lists/* \
&& curl -O https://bootstrap.pypa.io/pip/3.6/get-pip.py \
&& python3 get-pip.py \
&& pip install awscli
gnupg

# Create the target directory
# Install pip using the recommended way for Alpine Linux
RUN python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools

# Install AWS CLI using pip
RUN pip3 install awscli

# Create the target directory for HTML files
RUN mkdir -p /etc/nginx/html/

# Copy Nginx configuration file and entrypoint script
COPY nginx.conf /etc/nginx/nginx.conf
COPY entrypoint.sh ./entrypoint.sh

# Set execute permissions for the entrypoint script
RUN chmod +x ./entrypoint.sh

# Expose port 80 for Nginx
EXPOSE 80

0 comments on commit 50003ab

Please sign in to comment.