Update Dockerfile
Browse files- Dockerfile +6 -9
Dockerfile
CHANGED
|
@@ -2,28 +2,25 @@ FROM ubuntu:22.04
|
|
| 2 |
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
| 5 |
-
# Update & install tools
|
| 6 |
RUN apt update && apt install -y \
|
| 7 |
openssh-server \
|
| 8 |
-
curl \
|
| 9 |
wget \
|
|
|
|
| 10 |
tar \
|
| 11 |
nano \
|
| 12 |
ca-certificates \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
-
# Setup SSH server
|
| 16 |
RUN mkdir /var/run/sshd
|
| 17 |
RUN echo 'root:root' | chpasswd
|
| 18 |
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
RUN wget -O /pinggy https://pinggy.io/cli/download/linux/x86_64 \
|
| 22 |
-
&& chmod +x /pinggy
|
| 23 |
-
|
| 24 |
-
# Copy start script
|
| 25 |
COPY start.sh /start.sh
|
| 26 |
RUN chmod +x /start.sh
|
| 27 |
|
| 28 |
-
#
|
|
|
|
|
|
|
|
|
|
| 29 |
CMD ["/start.sh"]
|
|
|
|
| 2 |
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 4 |
|
|
|
|
| 5 |
RUN apt update && apt install -y \
|
| 6 |
openssh-server \
|
|
|
|
| 7 |
wget \
|
| 8 |
+
curl \
|
| 9 |
tar \
|
| 10 |
nano \
|
| 11 |
ca-certificates \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
|
|
|
| 14 |
RUN mkdir /var/run/sshd
|
| 15 |
RUN echo 'root:root' | chpasswd
|
| 16 |
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
|
| 17 |
|
| 18 |
+
# Copy start.sh ke container
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
COPY start.sh /start.sh
|
| 20 |
RUN chmod +x /start.sh
|
| 21 |
|
| 22 |
+
# Copy Pinggy binary secara manual (misal letakkan di folder build context)
|
| 23 |
+
COPY pinggy /pinggy
|
| 24 |
+
RUN chmod +x /pinggy
|
| 25 |
+
|
| 26 |
CMD ["/start.sh"]
|