Skip to content

Commit

Permalink
svn Dockerfile 생성
Browse files Browse the repository at this point in the history
svn Dockerfile 생성
docker_container_check.sh 스크립트 수정
Readme 수정
  • Loading branch information
gymbombom committed Dec 28, 2019
1 parent 03eb4d3 commit 5a29408
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
21 changes: 8 additions & 13 deletions Docker/shell/docker_container_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ function vsftpd_chk()
PID=`docker exec vsftpd ps -ef | grep vsftpd | grep -v grep | awk '{print $1}'`;

if [ -z $PID ];then
docker exec vsftpd nohup /usr/sbin/vsftpd /home/vsftpd/share/conf/vsftpd.conf > /home/vsftpd/share/logs/vsftpd.log &;
# docker exec vsftpd nohup /usr/sbin/vsftpd /home/vsftpd/share/conf/vsftpd.conf > /home/vsftpd/share/logs/vsftpd.log &;
echo "develomenting..."
fi
}

Expand Down Expand Up @@ -54,15 +55,12 @@ function svn_chk()

if [ -z $STATUS ]; then
docker start svn;
# echo "not runnig transmission"
fi

PID=`docker exec svn ps -ef | grep svnserve | awk '{print $2}'`;
PID=`docker exec svn ps -ef | grep svnserve | grep -v grep | awk '{print $1}'`;

if [ -z $PID ];then
#docker exec transmission service transmission-daemon start;
docker exec svn svnserve -d -r /home/svn/repos
# echo "not run app";
docker exec svn svnserve -d -r /home/svn/share/repos
fi
}

Expand All @@ -72,15 +70,12 @@ function git_chk()

if [ -z $STATUS ]; then
docker start git;
# echo "not runnig transmission"
fi

PID=`docker exec git ps -ef | grep sshd | awk '{print $2}'`;

if [ -z $PID ];then
#docker exec transmission service transmission-daemon start;
docker exec git /usr/sbin/sshd
# echo "not run app";
docker exec git /usr/sbin/sshd
fi
}

Expand Down Expand Up @@ -141,10 +136,10 @@ function snmpd_chk()
}


vsftpd_chk
#vsftpd_chk
transmission_chk
#node_kgs_chk
#svn_chk
#git_chk
svn_chk
git_chk
#multi_transmission_chk
#snmpd_chk
20 changes: 10 additions & 10 deletions Docker/svn/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM ubuntu:18.04
FROM alpine:3.10.3

MAINTAINER Andamiro <dlfrb2002@gmail.com>
MAINTAINER gymbombom <gymbombom@kakao.com>

RUN apt-get update -y
RUN apt-get upgrade -y
RUN apk update
RUN apk upgrade

RUN apk add subversion

RUN apt-get install vim -y
RUN apt-get install net-tools -y
RUN apt-get install language-pack-ko -y
RUN apt-get install subversion -y
RUN mkdir -p /home/svn/share
RUN chmod 777 /home/svn
RUN chmod 777 /home/svn/share


RUN useradd -ms /bin/bash svn

EXPOSE 3690

VOLUME ["/home/svn/share"]
40 changes: 36 additions & 4 deletions Docker/svn/Readme
Original file line number Diff line number Diff line change
@@ -1,6 +1,38 @@
# build command
docker build --tag svn:1 .
1. dockerfile Build
cd dockerfile_path
sudo docker build --tag rasp_svn:1 .


2. volume setting
(연결할 volume의 directory 구조는 아래와 같음)
(repos directory 하위에 repository를 위치시킨다.)

share/ -
repos/


3. docker run
docker run -it -p 3690:3690 -v /home/pi/share/svn/share:/home/svn/share --name svn rasp_svn:1 /bin/ash


4. svn daemon start
/usr/bin/svnserve -d -r /home/svn/share/repos



5.svn repository create
/usr/bin/svnadmin create --fs-type fsfs /home/svn/share/repos/test;


6.config 파일 수정
# /home/svn/share/repos/test/conf/svnserve.conf

anon-access = read
auth-access = write
password-db = passwd


7.passwd 수정
# /home/svn/share/repos/test/conf/passwd

# run command
docker run -it -p 3690:3690 -v /home/pi/svn:/home/svn/repos --name svn svn:1 /bin/bash

0 comments on commit 5a29408

Please sign in to comment.