make a docker file based on ubuntu 22.04, install latest nginx, create a sample…
- User
make a docker file based on ubuntu 22.04, install latest nginx, create a sample index.html with a random wiki page
Assistant
Here's a Dockerfile that creates an Ubuntu 22.04-based Docker image with the latest version of Nginx and a sample index.html file with a random Wikipedia page:
Use the latest version of Ubuntu 22.04 as the base image
FROM ubuntu:22.04
Set the default command to run when the container starts
CMD ["/bin/bash"]
Install Nginx and other necessary packages
RUN apt-get update && apt-get install -y nginx nginx-full && rm -rf /var/lib/apt/lists/*
Create a new directory for the website content
RUN mkdir /usr/share/nginx/html
Copy a sample index.html file into the website content directory
COPY index.html /usr/share/nginx/html/
Start Nginx when the container starts
CMD ["/usr/sbin/nginx", "-g", "daemon off;"]
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.