ํฌํŠธ ์ฃผ์†Œ๋Š” 2115๋กœ ํ•ด์ฃผ์—ˆ๋‹ค.

 

Dockerfile

FROM ubuntu:18.04

RUN dpkg --add-architecture amd64
RUN apt update
RUN apt install -y xinetd
ENV TERM=linux

RUN useradd egg

ADD xinetd /etc/xinetd.d/
ADD share /home/exme

RUN chmod 460 /home/exme/*

RUN chown injection:root /home/exme/*
RUN chmod +x /home/exme/exme
RUN chmod +x /home/exme/run.sh

CMD ["/usr/sbin/xinetd","-dontfork"]

 

 

docker-compose.yml

version: '3'

services:
    ctf:
      build: .
      ports:
        - "2115:2115"

 

xinetd

service ctf
{
	disable = no
	type = UNLISTED
	wait = no
	server = /home/exme/run.sh
	socket_type = stream
	protocol = tcp
	user = user
	port = 2115
	flags = REUSE

}
๋ณต์‚ฌํ–ˆ์Šต๋‹ˆ๋‹ค!