forked from lerenn/docker-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (29 loc) · 800 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM debian:jessie
MAINTAINER Louis Fradin <[email protected]>
# Update system
RUN apt-get update && apt-get upgrade -y
# Install requirements
RUN apt-get install -y openssh-server
RUN apt-get install whois -y
# Copy configurations
COPY configurations/sshd_config /etc/ssh/sshd_config
# Configure some directories
RUN mkdir /server
RUN chown root:root /server
RUN chmod 755 /server
RUN mkdir /server/data
# Copy scripts
COPY scripts/docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
COPY scripts/docker-configuration.sh /docker-configuration.sh
RUN chmod +x /docker-configuration.sh
# Create groups
RUN addgroup sftp
# Environment variables
ENV USERNAME username
ENV PASSWORD password
# Volume
VOLUME /server/data
# Ports
EXPOSE 22
CMD /docker-entrypoint.sh