first commit
This commit is contained in:
commit
3089ae775d
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@ -0,0 +1,27 @@
|
||||
FROM jrei/systemd-debian
|
||||
|
||||
ENV container docker
|
||||
ENV LC_ALL C
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
copy files /
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
openssh-server vim \
|
||||
net-tools \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
&& rm -f /lib/systemd/system/multi-user.target.wants/* \
|
||||
/etc/systemd/system/*.wants/* \
|
||||
/lib/systemd/system/local-fs.target.wants/* \
|
||||
/lib/systemd/system/sockets.target.wants/*udev* \
|
||||
/lib/systemd/system/sockets.target.wants/*initctl* \
|
||||
/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup* \
|
||||
/lib/systemd/system/systemd-update-utmp*
|
||||
|
||||
RUN mkdir /var/run/sshd
|
||||
RUN systemctl enable ssh
|
||||
RUN service ssh start
|
||||
VOLUME [ "/sys/fs/cgroup" ]
|
||||
|
||||
run chmod +x /install.sh
|
||||
run /install.sh
|
15
docker-compose.yml
Normal file
15
docker-compose.yml
Normal file
@ -0,0 +1,15 @@
|
||||
version: "3"
|
||||
services:
|
||||
ssh-server:
|
||||
image: ssh-server
|
||||
privileged: true
|
||||
build: .
|
||||
ports:
|
||||
- "2222:22"
|
||||
volumes:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
tmpfs:
|
||||
- /run
|
||||
- /run/lock
|
||||
ports:
|
||||
- "2222:22"
|
11
files/install.sh
Normal file
11
files/install.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
systemctl enable ssh > /log
|
||||
service ssh start >> /log
|
||||
touch /HIJdoetHET------------------------------------------------
|
||||
mkdir /run/sshd >> /log
|
||||
systemctl enable ssh.service >>/log
|
||||
systemctl start ssh.service >> /log
|
||||
dpkg -i /naaf-linuxpamclient-debian-release-6.3.70017.deb >> /log
|
||||
chmod +x /opt/pam_aucore/bin/activate-nondomain.sh >> /log
|
||||
echo YES | /opt/pam_aucore/bin/activate-nondomain.sh >> /log
|
BIN
files/naaf-linuxpamclient-debian-release-6.3.70017.deb
Normal file
BIN
files/naaf-linuxpamclient-debian-release-6.3.70017.deb
Normal file
Binary file not shown.
2
runCommand
Normal file
2
runCommand
Normal file
@ -0,0 +1,2 @@
|
||||
docker run -it --rm --name ssh-server --tmpfs /tmp --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro ssh-server
|
||||
|
14
yamls/ssh-server-claim0-persistentvolumeclaim.yaml
Normal file
14
yamls/ssh-server-claim0-persistentvolumeclaim.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: ssh-server-claim0
|
||||
name: ssh-server-claim0
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadOnlyMany
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
status: {}
|
55
yamls/ssh-server-deployment.yaml
Normal file
55
yamls/ssh-server-deployment.yaml
Normal file
@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.cmd: kompose convert -f ../docker-compose.yml
|
||||
kompose.version: 1.22.0 (955b78124)
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: ssh-server
|
||||
name: ssh-server
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
io.kompose.service: ssh-server
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.cmd: kompose convert -f ../docker-compose.yml
|
||||
kompose.version: 1.22.0 (955b78124)
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: ssh-server
|
||||
spec:
|
||||
containers:
|
||||
- image: ssh-server
|
||||
name: ssh-server
|
||||
ports:
|
||||
- containerPort: 22
|
||||
resources: {}
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: /sys/fs/cgroup
|
||||
name: ssh-server-claim0
|
||||
readOnly: true
|
||||
- mountPath: /run
|
||||
name: ssh-server-tmpfs0
|
||||
- mountPath: /run/lock
|
||||
name: ssh-server-tmpfs1
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: ssh-server-claim0
|
||||
persistentVolumeClaim:
|
||||
claimName: ssh-server-claim0
|
||||
readOnly: true
|
||||
- emptyDir:
|
||||
medium: Memory
|
||||
name: ssh-server-tmpfs0
|
||||
- emptyDir:
|
||||
medium: Memory
|
||||
name: ssh-server-tmpfs1
|
||||
status: {}
|
19
yamls/ssh-server-service.yaml
Normal file
19
yamls/ssh-server-service.yaml
Normal file
@ -0,0 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
kompose.cmd: kompose convert -f ../docker-compose.yml
|
||||
kompose.version: 1.22.0 (955b78124)
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
io.kompose.service: ssh-server
|
||||
name: ssh-server
|
||||
spec:
|
||||
ports:
|
||||
- name: "2222"
|
||||
port: 2222
|
||||
targetPort: 22
|
||||
selector:
|
||||
io.kompose.service: ssh-server
|
||||
status:
|
||||
loadBalancer: {}
|
Loading…
Reference in New Issue
Block a user