first commit
This commit is contained in:
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM debian:stable-slim
|
||||
|
||||
MAINTAINER BeN
|
||||
|
||||
RUN apt-get clean && apt-get update && apt-get -y upgrade
|
||||
|
||||
RUN apt-get install -y \
|
||||
openssh-server
|
||||
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN useradd -rm -d /home/ben -s /bin/bash -g root -G sudo -u 1000 ben
|
||||
|
||||
RUN echo 'ben:ben' | chpasswd
|
||||
|
||||
RUN service ssh start
|
||||
|
||||
EXPOSE 22
|
||||
|
||||
CMD ["/usr/sbin/sshd","-D"]
|
||||
44
makefile
Normal file
44
makefile
Normal file
@@ -0,0 +1,44 @@
|
||||
#########################################
|
||||
#VARIABLES: CAN BE EDITED
|
||||
#########################################
|
||||
|
||||
CONTAINER=test
|
||||
|
||||
CONTNAME=$(CONTAINER)-1
|
||||
|
||||
DATAVOLUME=$(shell pwd)
|
||||
|
||||
#net=host: mandatory for others containers to connect to mysql
|
||||
STARTOPT=-d \
|
||||
-p 22122:22 \
|
||||
--name $(CONTNAME) \
|
||||
$(CONTAINER)
|
||||
|
||||
|
||||
#########################################
|
||||
# ACTIONS: DO NOT EDIT BEYOND THIS POINT
|
||||
#########################################
|
||||
|
||||
build:
|
||||
docker build -t $(CONTAINER) .
|
||||
|
||||
build-nocache:
|
||||
docker build --no-cache -t $(CONTAINER) .
|
||||
|
||||
run:
|
||||
docker run $(STARTOPT)
|
||||
|
||||
bash:
|
||||
docker exec -i -t $(CONTNAME) /bin/bash
|
||||
|
||||
stop:
|
||||
docker stop $(CONTNAME)
|
||||
|
||||
delete:
|
||||
docker rm $(CONTNAME)
|
||||
|
||||
clear:
|
||||
docker rmi -f $(CONTAINER)
|
||||
|
||||
install:
|
||||
docker run --restart=always $(STARTOPT)
|
||||
Reference in New Issue
Block a user