Spaces:
Build error
Build error
Commit
·
5390ecb
1
Parent(s):
0d99e1a
Update Dockerfile
Browse files- Dockerfile +75 -32
Dockerfile
CHANGED
@@ -1,45 +1,88 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
#
|
4 |
-
|
|
|
5 |
|
6 |
-
#
|
7 |
-
|
8 |
-
RUN
|
9 |
-
|
10 |
|
11 |
-
#
|
12 |
-
|
13 |
|
14 |
-
#
|
15 |
-
RUN
|
16 |
-
RUN
|
|
|
|
|
|
|
|
|
17 |
|
18 |
-
#
|
19 |
-
|
20 |
-
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
-
#
|
27 |
-
|
|
|
|
|
28 |
|
|
|
|
|
|
|
29 |
|
30 |
-
#
|
31 |
-
|
32 |
|
33 |
-
#
|
34 |
-
|
35 |
-
# switch back to root to execute start commands
|
36 |
-
USER root
|
37 |
|
|
|
|
|
|
|
38 |
|
39 |
-
#
|
40 |
-
|
41 |
-
apt install iproute2 libcap2-bin -y && \
|
42 |
-
setcap cap_net_bind_service=+ep `readlink -f \`which node\``
|
43 |
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#------------------------------------------------------------------------
|
2 |
+
# Dynamic iPXE image generator
|
3 |
+
#
|
4 |
+
# Copyright (C) 2012-2021 Francois Lacroix. All Rights Reserved.
|
5 |
+
# License: GNU General Public License version 3 or later; see LICENSE.txt
|
6 |
+
# Website: http://ipxe.org, https://github.com/xbgmsharp/ipxe-buildweb
|
7 |
+
#------------------------------------------------------------------------
|
8 |
+
#
|
9 |
+
# Ubuntu LTS + Apache2 + module + my app
|
10 |
+
#
|
11 |
+
# Base from ultimate-seed Dockerfile
|
12 |
+
# https://github.com/pilwon/ultimate-seed
|
13 |
+
#
|
14 |
+
# AUTHOR: [email protected]
|
15 |
+
# WEBSITE: https://github.com/xbgmsharp/ipxe-buildweb
|
16 |
+
#
|
17 |
+
# DOCKER-VERSION 1.0.0
|
18 |
+
# VERSION 0.0.1
|
19 |
|
20 |
+
# Pull base image.
|
21 |
+
FROM ubuntu:latest
|
22 |
+
LABEL Francois Lacroix <[email protected]>
|
23 |
|
24 |
+
# Setup system and install tools
|
25 |
+
#RUN echo "initscripts hold" | dpkg --set-selections
|
26 |
+
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
27 |
+
RUN echo 'alias ll="ls -lah --color=auto"' >> /etc/bash.bashrc
|
28 |
|
29 |
+
# Make sure the package repository is up to date
|
30 |
+
RUN apt-get update && apt-get -yq upgrade
|
31 |
|
32 |
+
# Set locale
|
33 |
+
RUN apt-get -qqy install locales
|
34 |
+
#RUN locale-gen --purge en_US en_US.UTF-8
|
35 |
+
#RUN dpkg-reconfigure locales
|
36 |
+
RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
37 |
+
ENV LANG en_US.utf8
|
38 |
+
ENV LC_ALL en_US.UTF-8
|
39 |
|
40 |
+
# Set ENV
|
41 |
+
ENV HOME /root
|
42 |
+
ENV DEBIAN_FRONTEND noninteractive
|
43 |
|
44 |
+
# Install SSH
|
45 |
+
RUN apt-get install -y openssh-server
|
46 |
+
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
|
47 |
+
RUN sed -ri 's/#UsePAM no/UsePAM no/g' /etc/ssh/sshd_config
|
48 |
+
RUN sed 's/#PermitRootLogin yes/PermitRootLogin yes/' -i /etc/ssh/sshd_config
|
49 |
+
RUN sed 's/PermitRootLogin without-password/PermitRootLogin yes/' -i /etc/ssh/sshd_config
|
50 |
+
RUN mkdir /var/run/sshd
|
51 |
+
RUN echo 'root:admin' | chpasswd
|
52 |
|
53 |
+
# Add the install script in the directory.
|
54 |
+
ADD install.sh /tmp/install.sh
|
55 |
+
RUN chmod +x /tmp/install.sh
|
56 |
+
#ADD . /app
|
57 |
|
58 |
+
# Install it all
|
59 |
+
RUN \
|
60 |
+
bash /tmp/install.sh
|
61 |
|
62 |
+
# Define environment variables
|
63 |
+
ENV PORT 80
|
64 |
|
65 |
+
# Define working directory.
|
66 |
+
WORKDIR /var/www/ipxe-buildweb
|
|
|
|
|
67 |
|
68 |
+
# Define default command.
|
69 |
+
# Start ssh and other services.
|
70 |
+
#CMD ["/bin/bash", "/tmp/install.sh"]
|
71 |
|
72 |
+
# Expose ports.
|
73 |
+
EXPOSE 80
|
|
|
|
|
74 |
|
75 |
+
# Clean up APT when done.
|
76 |
+
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
77 |
+
|
78 |
+
# Make sure the package repository is up to date
|
79 |
+
ONBUILD apt-get update && apt-get -yq upgrade
|
80 |
+
ONBUILD apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
81 |
+
|
82 |
+
# Allow to execute
|
83 |
+
RUN chmod +x /opt/rom-o-matic/start.sh
|
84 |
+
RUN chmod +x /opt/rom-o-matic/update.sh
|
85 |
+
|
86 |
+
#RUN /etc/init.d/apache2 start
|
87 |
+
#ENTRYPOINT ["/usr/bin/tail","-f","/var/log/apache2/access.log"]
|
88 |
+
ENTRYPOINT ["/opt/rom-o-matic/start.sh"]
|