File tree 4 files changed +20
-16
lines changed
4 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ARG TARGETOS=linux
5
5
ARG TARGETARCH=amd64
6
6
7
7
RUN apt-get update -y && \
8
- apt-get install -y --no-install-recommends make rsync && \
8
+ apt-get install -y --no-install-recommends make rsync openssh-server ssh && \
9
9
apt-get clean && \
10
10
rm -rf /var/lib/apt/lists/*
11
11
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import (
19
19
// @basePath /ant
20
20
func main () {
21
21
22
- err := utils .Script (utils .JoinRootPathWith ("/script/install_rsync .sh" ), []string {})
22
+ err := utils .Script (utils .JoinRootPathWith ("/script/install_required_utils .sh" ), []string {})
23
23
if err != nil {
24
24
log .Fatal ("required tool can not install" )
25
25
}
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ # Function to check and install a package
5
+ check_and_install () {
6
+ PACKAGE_NAME=$1
7
+ if command -v $PACKAGE_NAME & > /dev/null; then
8
+ echo " $PACKAGE_NAME is already installed."
9
+ else
10
+ echo " Installing $PACKAGE_NAME ..."
11
+ apt-get update -y
12
+ apt-get install -y $PACKAGE_NAME
13
+ fi
14
+ }
15
+
16
+ check_and_install rsync
17
+ sleep 1
18
+ check_and_install ssh
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments