Skip to content

Commit f5e3247

Browse files
committed
Add .dockerignore and update Dockerfile for multiarch support
1 parent 26c5583 commit f5e3247

File tree

3 files changed

+416
-100
lines changed

3 files changed

+416
-100
lines changed

.dockerignore

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Version control
2+
.git
3+
.gitignore
4+
.svn
5+
.hg
6+
7+
# Development environments
8+
.env
9+
.venv
10+
venv/
11+
env/
12+
.idea/
13+
.vscode/
14+
*.swp
15+
*.swo
16+
17+
# Dependencies
18+
node_modules/
19+
bower_components/
20+
vendor/
21+
package-lock.json
22+
yarn.lock
23+
24+
# Build outputs
25+
dist/
26+
build/
27+
*.pyc
28+
__pycache__/
29+
*.class
30+
*.o
31+
*.obj
32+
33+
# Logs and databases
34+
*.log
35+
logs/
36+
*.sqlite
37+
*.db
38+
39+
# OS generated files
40+
.DS_Store
41+
.DS_Store?
42+
._*
43+
.Spotlight-V100
44+
.Trashes
45+
ehthumbs.db
46+
Thumbs.db
47+
48+
# Docker specific
49+
Dockerfile
50+
.dockerignore
51+
docker-compose*.yml
52+
53+
# Documentation
54+
README.md
55+
CHANGELOG.md
56+
docs/
57+
*.md
58+
59+
# Test files
60+
test/
61+
tests/
62+
coverage/
63+
.coverage
64+
.pytest_cache/

Dockerfile

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
# Simple Dockerfile to demonstrate the use of the `uname` command.
1+
# Simple Dockerfile to demonstrate the use of the multiarch on native architecture.
22
# This Dockerfile is based on the latest Alpine Linux image.
33
# The `uname` command is used to display system information.
44
FROM alpine:latest
5+
RUN echo "Building a multiarch image for the latest Alpine Linux version" \
6+
&& echo "This image will run on any architecture supported by Alpine Linux" \
7+
&& echo "The default command will display system information using the `uname` command" \
8+
&& echo "The `uname` command is used to print system information, including the kernel name, version, and architecture"
9+
10+
RUN echo 'System Information:' \
11+
&& uname -a \
12+
&& echo 'Hello, World!' \
13+
&& echo 'Current Date and Time:' \
14+
&& date
15+
516
# Set the default command to run when the container starts
617
# This command will echo the system information using `uname -a`, a hello world message, and the current date and time to stdout, then exit cleanly.
7-
CMD ["sh", "-c", "uname -a; echo 'Hello, World!'; date"]
18+
CMD ["sh", "-c", "echo 'System Information:' && uname -a && echo 'Hello, World!' && echo 'Current Date and Time:' && date"]
819
# The `uname -a` command prints all system information, including the kernel name, version, and architecture.

0 commit comments

Comments
 (0)