-
Notifications
You must be signed in to change notification settings - Fork 348
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (28 loc) · 1.28 KB
/
Dockerfile
File metadata and controls
35 lines (28 loc) · 1.28 KB
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
# This Dockerfile is used to prepare a Debian-based Docker image with several utilities installed.
# We start from the Debian 'trixie' image.
FROM debian:trixie-20260316 as prepare-stage
# Copy all shell scripts from the current directory to /usr/local/bin/ in the image.
COPY *sh /usr/local/bin/
# Make all shell scripts in /usr/local/bin/ executable.
RUN chmod +x /usr/local/bin/*.sh
# The RUN command executes a series of commands in the new layer of the image and commits the results.
# The following commands are executed:
# 1. Update the package list.
# 2. Install necessary dependencies including several utilities and remove the package list to reduce the image size.
RUN apt update && apt install -y --no-install-recommends \
ca-certificates \
curl \
git \
gnupg \
nano \
openssh-client \
procps \
unzip \
wget \
&& rm -rf /var/lib/apt/lists/* && rm -fr /tmp/*
# Run the keygen.sh script with /ssh-dir as an argument.
# This script is expected to generate SSH keys and store them in /ssh-dir.
RUN /usr/local/bin/keygen.sh /ssh-dir
# The CMD command specifies the default command to execute when the container starts.
# In this case, it prints a message and lists the contents of /ssh-dir.
CMD ["sh", "-c", "echo 'Export stage is ready'; ls -l /ssh-dir/"]