docker files
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -21,3 +21,6 @@ generate/Test
|
||||
#ignore windows exe files
|
||||
*.exe
|
||||
dist/
|
||||
|
||||
# ignore docker image files
|
||||
server/docker/containers/
|
||||
|
||||
Submodule Akilan1999/docker-ubuntu-sshdserver/docker/containers/Akilan1999/docker-ubuntu-sshd added at fbee2ad6a9
@@ -135,7 +135,7 @@ var CliAction = func(ctx *cli.Context) error {
|
||||
|
||||
//Sets default paths to the config file
|
||||
if SetDefaultConfig {
|
||||
err := generate.SetDefaults("P2PRC")
|
||||
err := generate.SetDefaults("P2PRC", false)
|
||||
if err != nil {
|
||||
fmt.Print(err)
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package generate
|
||||
|
||||
import (
|
||||
"github.com/Akilan1999/p2p-rendering-computation/p2p"
|
||||
"github.com/go-git/go-git/v5"
|
||||
"os"
|
||||
)
|
||||
|
||||
@@ -100,14 +101,18 @@ func GenerateDockerFiles() (err error) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
//if _, err = os.Stat(path + "server/docker/ip_table.json"); os.IsNotExist(err) {
|
||||
// _, err = os.Create(path + "p2p/iptable/ip_table.json")
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
// Clone base docker image
|
||||
_, err = git.PlainClone(path+"server/docker/containers/docker-ubuntu-sshd", false, &git.CloneOptions{
|
||||
URL: "https://github.com/Akilan1999/docker-ubuntu-sshd",
|
||||
Progress: os.Stdout,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
BIN
server/.DS_Store
vendored
Normal file
BIN
server/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
server/docker/.DS_Store
vendored
Normal file
BIN
server/docker/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
Containers
|
||||
===========
|
||||
|
||||
Structure
|
||||
|_ Containers
|
||||
|_ <name> (To ensure the name is the same as the tag name)
|
||||
|_ DockerFile
|
||||
@@ -1,43 +0,0 @@
|
||||
from horovod/horovod-cpu
|
||||
# Switch to root user to install additional software
|
||||
USER 0
|
||||
|
||||
|
||||
# Make sure we don't get notifications we can't answer during building.
|
||||
env DEBIAN_FRONTEND noninteractive
|
||||
|
||||
run apt-get -q -y update; apt-get -q -y upgrade
|
||||
run apt install net-tools
|
||||
|
||||
# Prepare scripts and configs
|
||||
add ./scripts/start /start
|
||||
|
||||
|
||||
# Set root password
|
||||
run echo 'root:password' >> /root/passwdfile
|
||||
|
||||
|
||||
# Create user and it's password
|
||||
run useradd -m -G sudo master && \
|
||||
echo 'master:password' >> /root/passwdfile
|
||||
|
||||
|
||||
# Apply root password
|
||||
run chpasswd -c SHA512 < /root/passwdfile && \
|
||||
rm /root/passwdfile
|
||||
|
||||
|
||||
# Port 22 is used for ssh
|
||||
expose 22
|
||||
|
||||
|
||||
# Assign /data as static volume.
|
||||
volume ["/data"]
|
||||
|
||||
|
||||
# Fix all permissions
|
||||
run chmod +x /start
|
||||
|
||||
|
||||
# Starting sshd
|
||||
cmd ["/start"]
|
||||
@@ -1 +0,0 @@
|
||||
Running official horovod dockerfile cpu version
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
# -----------------------------------------------------------------------------
|
||||
# docker-ubuntu-sshd /start script
|
||||
#
|
||||
# Authors: Art567
|
||||
# Updated: Sep 20th, 2015
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Run OpenSSH server in daemon mode
|
||||
/usr/sbin/sshd -D
|
||||
@@ -1,61 +0,0 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# This is base image of Ubuntu LTS with SSHD service.
|
||||
#
|
||||
# Authors: Art567
|
||||
# Updated: Sep 20th, 2015
|
||||
# Require: Docker (http://www.docker.io/)
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Base system is the latest LTS version of Ubuntu.
|
||||
# from consol/ubuntu-xfce-vnc
|
||||
|
||||
# due to dependency issues vnc is still work in progress
|
||||
from ubuntu:20.04
|
||||
|
||||
# Switch to root user to install additional software
|
||||
USER 0
|
||||
|
||||
|
||||
# Make sure we don't get notifications we can't answer during building.
|
||||
env DEBIAN_FRONTEND noninteractive
|
||||
|
||||
|
||||
# Prepare scripts and configs
|
||||
add ./scripts/start /start
|
||||
|
||||
|
||||
# Download and install everything from the repos.
|
||||
run apt-get -q -y update; apt-get -q -y upgrade && \
|
||||
apt-get -q -y install sudo openssh-server && \
|
||||
mkdir /var/run/sshd
|
||||
|
||||
|
||||
# Set root password
|
||||
run echo 'root:password' >> /root/passwdfile
|
||||
|
||||
|
||||
# Create user and it's password
|
||||
run useradd -m -G sudo master && \
|
||||
echo 'master:password' >> /root/passwdfile
|
||||
|
||||
|
||||
# Apply root password
|
||||
run chpasswd -c SHA512 < /root/passwdfile && \
|
||||
rm /root/passwdfile
|
||||
|
||||
|
||||
# Port 22 is used for ssh
|
||||
expose 22
|
||||
|
||||
|
||||
# Assign /data as static volume.
|
||||
volume ["/data"]
|
||||
|
||||
|
||||
# Fix all permissions
|
||||
run chmod +x /start
|
||||
|
||||
|
||||
# Starting sshd
|
||||
cmd ["/start"]
|
||||
@@ -1,72 +0,0 @@
|
||||
Ubuntu LTS with SSH (Docker)
|
||||
=========
|
||||
|
||||
A Docker file to build a [docker.io] base container with Ubuntu LTS and a sshd service
|
||||
[docker.io]: http://docker.io
|
||||
Nice and easy way to get any server up and running using docker
|
||||
|
||||
|
||||
Instructions
|
||||
-----------
|
||||
- Install Docker first.
|
||||
Read [installation instructions] (http://docs.docker.io/en/latest/installation/).
|
||||
|
||||
|
||||
- Clone this repository:
|
||||
|
||||
`$ git clone https://github.com/art567/docker-ubuntu-sshd.git`
|
||||
|
||||
|
||||
- Enter local directory:
|
||||
|
||||
`$ cd docker-ubuntu-sshd`
|
||||
|
||||
- Change passwords in Dockerfile:
|
||||
|
||||
`$ vi Dockerfile`
|
||||
|
||||
- Build the container:
|
||||
|
||||
`$ sudo docker build -t art567/ubuntu .`
|
||||
|
||||
|
||||
- Run the container:
|
||||
|
||||
`$ sudo docker run -d=true --name=ubuntu --restart=always -p=2222:22 -v=/opt/data:/data art567/ubuntu /start`
|
||||
|
||||
|
||||
- Your container will start and bind ssh to 2222 port.
|
||||
|
||||
|
||||
- Find your local IP Address:
|
||||
|
||||
`$ ifconfig`
|
||||
|
||||
|
||||
- Connect to the SSH server:
|
||||
|
||||
`$ ssh root@<ip-address> -p 2222`
|
||||
|
||||
|
||||
- If you don't want to deal with root:
|
||||
|
||||
`$ ssh master@<ip-address> -p 2222`
|
||||
|
||||
|
||||
**VERY IMPORTANT!!!**
|
||||
-----------
|
||||
|
||||
**Don't forget to change passwords in Dockerfile before building image!**
|
||||
|
||||
|
||||
Versions
|
||||
-----------
|
||||
Some branches represents Ubuntu versions.
|
||||
|
||||
Branch `master` is always represented by latest Ubuntu LTS
|
||||
|
||||
For example:
|
||||
- 12.04 - Ubuntu 12.04 LTS
|
||||
- 14.04 - Ubuntu 14.04 LTS
|
||||
- 16.04 - Ubuntu 16.04 LTS
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Simple Ubuntu 20.04 image
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"Port": [
|
||||
{
|
||||
"PortName": "SSH",
|
||||
"InternalPort": 22,
|
||||
"Type": "tcp",
|
||||
"Description": "SSH Port"
|
||||
},
|
||||
{
|
||||
"PortName": "VNC",
|
||||
"InternalPort": 5900,
|
||||
"Type": "tcp",
|
||||
"Description": "VNC port"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
# -----------------------------------------------------------------------------
|
||||
# docker-ubuntu-sshd /start script
|
||||
#
|
||||
# Authors: Art567
|
||||
# Updated: Sep 20th, 2015
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Run OpenSSH server in daemon mode
|
||||
/usr/sbin/sshd -D
|
||||
|
||||
# Running x11 server with password
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# This is base image of Ubuntu LTS with SSHD service.
|
||||
#
|
||||
# Authors: Art567
|
||||
# Updated: Sep 20th, 2015
|
||||
# Require: Docker (http://www.docker.io/)
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Base system is the latest LTS version of Ubuntu.
|
||||
# from consol/ubuntu-xfce-vnc
|
||||
|
||||
# due to dependency issues vnc is still work in progress
|
||||
from ubuntu:20.04
|
||||
|
||||
# Switch to root user to install additional software
|
||||
USER 0
|
||||
|
||||
|
||||
# Make sure we don't get notifications we can't answer during building.
|
||||
env DEBIAN_FRONTEND noninteractive
|
||||
|
||||
|
||||
# Prepare scripts and configs
|
||||
add ./scripts/start /start
|
||||
|
||||
|
||||
# Download and install everything from the repos.
|
||||
run apt-get -q -y update; apt-get -q -y upgrade && \
|
||||
apt-get -q -y install sudo openssh-server && \
|
||||
mkdir /var/run/sshd
|
||||
|
||||
|
||||
# Set root password
|
||||
run echo 'root:password' >> /root/passwdfile
|
||||
|
||||
|
||||
# Create user and it's password
|
||||
run useradd -m -G sudo master && \
|
||||
echo 'master:password' >> /root/passwdfile
|
||||
|
||||
|
||||
# Apply root password
|
||||
run chpasswd -c SHA512 < /root/passwdfile && \
|
||||
rm /root/passwdfile
|
||||
|
||||
|
||||
# Port 22 is used for ssh
|
||||
expose 22
|
||||
|
||||
|
||||
# Assign /data as static volume.
|
||||
volume ["/data"]
|
||||
|
||||
|
||||
# Fix all permissions
|
||||
run chmod +x /start
|
||||
|
||||
|
||||
# Starting sshd
|
||||
cmd ["/start"]
|
||||
@@ -1,72 +0,0 @@
|
||||
Ubuntu LTS with SSH (Docker)
|
||||
=========
|
||||
|
||||
A Docker file to build a [docker.io] base container with Ubuntu LTS and a sshd service
|
||||
[docker.io]: http://docker.io
|
||||
Nice and easy way to get any server up and running using docker
|
||||
|
||||
|
||||
Instructions
|
||||
-----------
|
||||
- Install Docker first.
|
||||
Read [installation instructions] (http://docs.docker.io/en/latest/installation/).
|
||||
|
||||
|
||||
- Clone this repository:
|
||||
|
||||
`$ git clone https://github.com/art567/docker-ubuntu-sshd.git`
|
||||
|
||||
|
||||
- Enter local directory:
|
||||
|
||||
`$ cd docker-ubuntu-sshd`
|
||||
|
||||
- Change passwords in Dockerfile:
|
||||
|
||||
`$ vi Dockerfile`
|
||||
|
||||
- Build the container:
|
||||
|
||||
`$ sudo docker build -t art567/ubuntu .`
|
||||
|
||||
|
||||
- Run the container:
|
||||
|
||||
`$ sudo docker run -d=true --name=ubuntu --restart=always -p=2222:22 -v=/opt/data:/data art567/ubuntu /start`
|
||||
|
||||
|
||||
- Your container will start and bind ssh to 2222 port.
|
||||
|
||||
|
||||
- Find your local IP Address:
|
||||
|
||||
`$ ifconfig`
|
||||
|
||||
|
||||
- Connect to the SSH server:
|
||||
|
||||
`$ ssh root@<ip-address> -p 2222`
|
||||
|
||||
|
||||
- If you don't want to deal with root:
|
||||
|
||||
`$ ssh master@<ip-address> -p 2222`
|
||||
|
||||
|
||||
**VERY IMPORTANT!!!**
|
||||
-----------
|
||||
|
||||
**Don't forget to change passwords in Dockerfile before building image!**
|
||||
|
||||
|
||||
Versions
|
||||
-----------
|
||||
Some branches represents Ubuntu versions.
|
||||
|
||||
Branch `master` is always represented by latest Ubuntu LTS
|
||||
|
||||
For example:
|
||||
- 12.04 - Ubuntu 12.04 LTS
|
||||
- 14.04 - Ubuntu 14.04 LTS
|
||||
- 16.04 - Ubuntu 16.04 LTS
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Simple Ubuntu 20.04 image
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"Port": [
|
||||
{
|
||||
"PortName": "SSH",
|
||||
"InternalPort": 22,
|
||||
"Type": "tcp",
|
||||
"Description": "SSH Port"
|
||||
},
|
||||
{
|
||||
"PortName": "NoVNC",
|
||||
"InternalPort": 5901,
|
||||
"Type": "tcp",
|
||||
"Description": "NoVNC port"
|
||||
},
|
||||
{
|
||||
"PortName": "NoVNC",
|
||||
"InternalPort": 6081,
|
||||
"Type": "tcp",
|
||||
"Description": "NoVNC port"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
# -----------------------------------------------------------------------------
|
||||
# docker-ubuntu-sshd /start script
|
||||
#
|
||||
# Authors: Art567
|
||||
# Updated: Sep 20th, 2015
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Run OpenSSH server in daemon mode
|
||||
/usr/sbin/sshd -D
|
||||
@@ -1,41 +0,0 @@
|
||||
from horovod/horovod
|
||||
# Switch to root user to install additional software
|
||||
USER 0
|
||||
|
||||
|
||||
# Make sure we don't get notifications we can't answer during building.
|
||||
env DEBIAN_FRONTEND noninteractive
|
||||
|
||||
|
||||
# Prepare scripts and configs
|
||||
add ./scripts/start /start
|
||||
|
||||
|
||||
# Set root password
|
||||
run echo 'root:password' >> /root/passwdfile
|
||||
|
||||
|
||||
# Create user and it's password
|
||||
run useradd -m -G sudo master && \
|
||||
echo 'master:password' >> /root/passwdfile
|
||||
|
||||
|
||||
# Apply root password
|
||||
run chpasswd -c SHA512 < /root/passwdfile && \
|
||||
rm /root/passwdfile
|
||||
|
||||
|
||||
# Port 22 is used for ssh
|
||||
expose 22
|
||||
|
||||
|
||||
# Assign /data as static volume.
|
||||
volume ["/data"]
|
||||
|
||||
|
||||
# Fix all permissions
|
||||
run chmod +x /start
|
||||
|
||||
|
||||
# Starting sshd
|
||||
cmd ["/start"]
|
||||
@@ -1 +0,0 @@
|
||||
Running official horovod dockerfile cpu version
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
# -----------------------------------------------------------------------------
|
||||
# docker-ubuntu-sshd /start script
|
||||
#
|
||||
# Authors: Art567
|
||||
# Updated: Sep 20th, 2015
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Run OpenSSH server in daemon mode
|
||||
/usr/sbin/sshd -D
|
||||
@@ -1,61 +0,0 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
# This is base image of Ubuntu LTS with SSHD service.
|
||||
#
|
||||
# Authors: Art567
|
||||
# Updated: Sep 20th, 2015
|
||||
# Require: Docker (http://www.docker.io/)
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Base system is the latest LTS version of Ubuntu.
|
||||
# from consol/ubuntu-xfce-vnc
|
||||
|
||||
# due to dependency issues vnc is still work in progress
|
||||
from dorowu/ubuntu-desktop-lxde-vnc
|
||||
|
||||
# Switch to root user to install additional software
|
||||
USER 0
|
||||
|
||||
|
||||
# Make sure we don't get notifications we can't answer during building.
|
||||
env DEBIAN_FRONTEND noninteractive
|
||||
|
||||
|
||||
# Prepare scripts and configs
|
||||
add ./scripts/start /start
|
||||
|
||||
|
||||
# Download and install everything from the repos.
|
||||
run apt-get -q -y update; apt-get -q -y upgrade && \
|
||||
apt-get -q -y install sudo openssh-server && \
|
||||
mkdir /var/run/sshd
|
||||
|
||||
|
||||
# Set root password
|
||||
run echo 'root:password' >> /root/passwdfile
|
||||
|
||||
|
||||
# Create user and it's password
|
||||
run useradd -m -G sudo master && \
|
||||
echo 'master:password' >> /root/passwdfile
|
||||
|
||||
|
||||
# Apply root password
|
||||
run chpasswd -c SHA512 < /root/passwdfile && \
|
||||
rm /root/passwdfile
|
||||
|
||||
|
||||
# Port 22 is used for ssh
|
||||
expose 22
|
||||
|
||||
|
||||
# Assign /data as static volume.
|
||||
volume ["/data"]
|
||||
|
||||
|
||||
# Fix all permissions
|
||||
run chmod +x /start
|
||||
|
||||
|
||||
# Starting sshd
|
||||
cmd ["/start"]
|
||||
@@ -1,72 +0,0 @@
|
||||
Ubuntu LTS with SSH (Docker)
|
||||
=========
|
||||
|
||||
A Docker file to build a [docker.io] base container with Ubuntu LTS and a sshd service
|
||||
[docker.io]: http://docker.io
|
||||
Nice and easy way to get any server up and running using docker
|
||||
|
||||
|
||||
Instructions
|
||||
-----------
|
||||
- Install Docker first.
|
||||
Read [installation instructions] (http://docs.docker.io/en/latest/installation/).
|
||||
|
||||
|
||||
- Clone this repository:
|
||||
|
||||
`$ git clone https://github.com/art567/docker-ubuntu-sshd.git`
|
||||
|
||||
|
||||
- Enter local directory:
|
||||
|
||||
`$ cd docker-ubuntu-sshd`
|
||||
|
||||
- Change passwords in Dockerfile:
|
||||
|
||||
`$ vi Dockerfile`
|
||||
|
||||
- Build the container:
|
||||
|
||||
`$ sudo docker build -t art567/ubuntu .`
|
||||
|
||||
|
||||
- Run the container:
|
||||
|
||||
`$ sudo docker run -d=true --name=ubuntu --restart=always -p=2222:22 -v=/opt/data:/data art567/ubuntu /start`
|
||||
|
||||
|
||||
- Your container will start and bind ssh to 2222 port.
|
||||
|
||||
|
||||
- Find your local IP Address:
|
||||
|
||||
`$ ifconfig`
|
||||
|
||||
|
||||
- Connect to the SSH server:
|
||||
|
||||
`$ ssh root@<ip-address> -p 2222`
|
||||
|
||||
|
||||
- If you don't want to deal with root:
|
||||
|
||||
`$ ssh master@<ip-address> -p 2222`
|
||||
|
||||
|
||||
**VERY IMPORTANT!!!**
|
||||
-----------
|
||||
|
||||
**Don't forget to change passwords in Dockerfile before building image!**
|
||||
|
||||
|
||||
Versions
|
||||
-----------
|
||||
Some branches represents Ubuntu versions.
|
||||
|
||||
Branch `master` is always represented by latest Ubuntu LTS
|
||||
|
||||
For example:
|
||||
- 12.04 - Ubuntu 12.04 LTS
|
||||
- 14.04 - Ubuntu 14.04 LTS
|
||||
- 16.04 - Ubuntu 16.04 LTS
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Simple Ubuntu 20.04 image
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
# -----------------------------------------------------------------------------
|
||||
# docker-ubuntu-sshd /start script
|
||||
#
|
||||
# Authors: Art567
|
||||
# Updated: Sep 20th, 2015
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
|
||||
# Run OpenSSH server in daemon mode
|
||||
/usr/sbin/sshd -D
|
||||
Reference in New Issue
Block a user