-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (17 loc) · 733 Bytes
/
Dockerfile
File metadata and controls
22 lines (17 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use the latest Ubuntu base image
FROM ubuntu:latest
# Update package lists and install packages (Apache)
# -y flag automatically answers yes to prompts
# Clean up apt-get cache to reduce image size
RUN apt-get update && \
apt-get install -y apache2 && \
rm -rf /var/lib/apt/lists/*
# Set the working directory inside the container
WORKDIR /app
# Copy the contents of the local "scripts" directory into the container's working directory
COPY scripts/ .
# Make all shell scripts in the working directory executable
RUN chmod +x ./*.sh 2>/dev/null || true
# Set the default command to open an interactive bash shell
# This allows you to manually run any of your scripts for testing.
CMD service apache2 start && /bin/bash