-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathDockerfile.fedora
More file actions
69 lines (47 loc) · 2.24 KB
/
Dockerfile.fedora
File metadata and controls
69 lines (47 loc) · 2.24 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM fedora:41
LABEL maintainer="Kamran Azeem & Henrik Høegh (kamranazeem@gmail.com, henrikrhoegh@gmail.com)"
EXPOSE 80 443 1180 11443
# Install some tools in the container and generate self-signed SSL certificates.
# Packages are listed in alphabetical order, for ease of readability and ease of maintenance.
RUN yum -y install \
bind-utils cpio diffutils findutils gzip jq \
iproute iputils mtr net-tools nginx openssl \
procps-ng telnet traceroute vim-minimal wget \
&& yum clean all \
&& mkdir /certs /docker \
&& chmod 700 /certs \
&& openssl req \
-x509 -newkey rsa:2048 -nodes -days 3650 \
-keyout /certs/server.key -out /certs/server.crt -subj '/CN=localhost'
# Copy a simple index.html to eliminate text (index.html) noise which comes with default nginx image.
# (I created an issue for this purpose here: https://github.com/nginxinc/docker-nginx/issues/234)
COPY index.html /usr/share/nginx/html/
# Copy a custom nginx.conf with log files redirected to stderr and stdout
COPY nginx.conf /etc/nginx/nginx.conf
COPY entrypoint.sh /docker/entrypoint.sh
# Run the startup script as ENTRYPOINT, which does few things and then starts nginx.
ENTRYPOINT ["/bin/sh" , "/docker/entrypoint.sh"]
# Start nginx in foreground:
CMD ["nginx", "-g", "daemon off;"]
###################################################################################################
# Build and Push (to dockerhub) instructions:
# -------------------------------------------
# docker build -t local/network-multitool:fedora .
# docker tag local/network-multitool praqma/network-multitool:fedora
# docker login
# docker push praqma/network-multitool:fedora
# Pull (from dockerhub):
# ----------------------
# docker pull praqma/network-multitool:fedora
# Usage - on Docker:
# ------------------
# docker run --rm -it praqma/network-multitool:fedora /bin/sh
# OR
# docker run -d praqma/network-multitool:fedora
# OR
# docker run -p 80:80 -p 443:443 -d praqma/network-multitool:fedora
# OR
# docker run -e HTTP_PORT=1180 -e HTTPS_PORT=11443 -p 1180:1180 -p 11443:11443 -d praqma/network-multitool:fedora
# Usage - on Kubernetes:
# ---------------------
# kubectl run multitool --image=praqma/network-multitool:fedora