adding alping dockersz
This commit is contained in:
parent
7136bd260a
commit
030ed26178
22
alpine_dockerz/Dockerfile
Normal file
22
alpine_dockerz/Dockerfile
Normal file
|
@ -0,0 +1,22 @@
|
|||
FROM alpine:latest
|
||||
|
||||
ARG USER
|
||||
ARG USER_PASSWORD
|
||||
|
||||
RUN apk update && apk upgrade && apk add alpine-sdk wget cmake coreutils bash openssh tmux git curl nmap john nano gcc python3 python
|
||||
RUN adduser -G abuild -g "Alpine Package Builder" -s /bin/ash -D $USER
|
||||
RUN echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
|
||||
&& mkdir /packages \
|
||||
&& chown $USER:abuild /packages \
|
||||
&& mkdir -p /var/cache/apk \
|
||||
&& ln -s /var/cache/apk /etc/apk/cache
|
||||
RUN apk add binwalk --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing
|
||||
RUN echo "${USER}:${USER_PASSWORD}" | chpasswd
|
||||
RUN rm -rf /etc/ssh/ssh_host_rsa_key /etc/ssh/ssh_host_dsa_key
|
||||
RUN ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
|
||||
RUN ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
|
||||
RUN mkdir -p /var/run/sshd
|
||||
|
||||
ADD motd /etc/motd
|
||||
EXPOSE 22
|
||||
CMD ["/usr/sbin/sshd", "-D"]
|
32
alpine_dockerz/docker-compose.yml
Normal file
32
alpine_dockerz/docker-compose.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
version: "3"
|
||||
services:
|
||||
alice:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- "USER=alice"
|
||||
- "USER_PASSWORD=<CHANGEME>"
|
||||
ports:
|
||||
- "9001:22"
|
||||
|
||||
bob:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- "USER=bob"
|
||||
- "USER_PASSWORD=<CHANGEME>"
|
||||
ports:
|
||||
- "9002:22"
|
||||
|
||||
chris:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- "USER=chris"
|
||||
- "USER_PASSWORD=<CHANGEME>"
|
||||
ports:
|
||||
- "9003:22"
|
Loading…
Reference in a new issue