-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore:removed vulenrablity issue from webapp image (#1968)
- Loading branch information
1 parent
6f65b14
commit 50003ab
Showing
1 changed file
with
19 additions
and
10 deletions.
There are no files selected for viewing
29 changes: 19 additions & 10 deletions
29
installer/resources/pacbot_app/files/ui_docker/dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |