add badge swag
This commit is contained in:
parent
c346abfc31
commit
6b0440fe94
20
README.md
20
README.md
@ -1,16 +1,20 @@
|
|||||||
|
[](https://travis-ci.com/Hermsi1337/docker-sshd) [](https://hub.docker.com/r/hermsi/alpine-sshd/)
|
||||||
## Make your OpenSSH fly on Alpine
|
## Make your OpenSSH fly on Alpine
|
||||||
|
|
||||||
### Overview
|
### Overview
|
||||||
|
|
||||||
Use this Dockerfile / -image to start a slim and highly customizable sshd-server with `bash` and `rsync` installed.
|
Use this Dockerfile / -image to start a slim and highly customizable sshd-server with `bash` and `rsync` installed.
|
||||||
|
|
||||||
### Regular builds, automagically
|
### Regular builds, automagically
|
||||||
[](https://travis-ci.com/Hermsi1337/docker-sshd)
|
|
||||||
Thanks to [Travis-CI](https://travis-ci.com/) this image is pushed weekly and creates new [tags](https://hub.docker.com/r/hermsi/alpine-sshd/tags/) if there are new versions available.
|
Thanks to [Travis-CI](https://travis-ci.com/) this image is pushed weekly and creates new [tags](https://hub.docker.com/r/hermsi/alpine-sshd/tags/) if there are new versions available.
|
||||||
|
|
||||||
### Tags
|
### Tags
|
||||||
|
|
||||||
For recent tags check [Dockerhub](https://hub.docker.com/r/hermsi/alpine-sshd/tags/).
|
For recent tags check [Dockerhub](https://hub.docker.com/r/hermsi/alpine-sshd/tags/).
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
* `bash`-shell and `rsync` installed
|
* `bash`-shell and `rsync` installed
|
||||||
* Default `.bashrc` from `ubuntu`
|
* Default `.bashrc` from `ubuntu`
|
||||||
* Desired shell is configurable by --env
|
* Desired shell is configurable by --env
|
||||||
@ -22,7 +26,9 @@ For recent tags check [Dockerhub](https://hub.docker.com/r/hermsi/alpine-sshd/ta
|
|||||||
* Beautifully colored log output
|
* Beautifully colored log output
|
||||||
|
|
||||||
### Usage examples
|
### Usage examples
|
||||||
|
|
||||||
#### Authentication as root by password
|
#### Authentication as root by password
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker run --rm \
|
$ docker run --rm \
|
||||||
--publish=1337:22 \
|
--publish=1337:22 \
|
||||||
@ -31,11 +37,13 @@ hermsi/alpine-sshd
|
|||||||
```
|
```
|
||||||
|
|
||||||
After the container is up you are able to ssh in it as root with the in --env provided password for "root"-user.
|
After the container is up you are able to ssh in it as root with the in --env provided password for "root"-user.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ ssh root@mydomain.tld -p 1337
|
$ ssh root@mydomain.tld -p 1337
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Authentication as root by ssh-keypair
|
#### Authentication as root by ssh-keypair
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker run --rm \
|
$ docker run --rm \
|
||||||
--publish=1337:22 \
|
--publish=1337:22 \
|
||||||
@ -45,11 +53,13 @@ hermsi/alpine-sshd
|
|||||||
```
|
```
|
||||||
|
|
||||||
After the container is up you are able to ssh in it as root with a private-key which matches the provided public-key in authorized_keys for "root"-user.
|
After the container is up you are able to ssh in it as root with a private-key which matches the provided public-key in authorized_keys for "root"-user.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ ssh root@mydomain.tld -p 1337 -i /path/to/private_key
|
$ ssh root@mydomain.tld -p 1337 -i /path/to/private_key
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Authenticate as additional user by ssh-keypair
|
#### Authenticate as additional user by ssh-keypair
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker run --rm \
|
$ docker run --rm \
|
||||||
--publish=1337:22 \
|
--publish=1337:22 \
|
||||||
@ -59,11 +69,13 @@ hermsi/alpine-sshd
|
|||||||
```
|
```
|
||||||
|
|
||||||
After the container is up you are able to ssh in it as the given user with a private-key that matches the provided public-key in authorized_keys for your created user.
|
After the container is up you are able to ssh in it as the given user with a private-key that matches the provided public-key in authorized_keys for your created user.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ ssh mydomain.tld -l hermsi -p 1337 -i /path/to/hermsi_private_key
|
$ ssh mydomain.tld -l hermsi -p 1337 -i /path/to/hermsi_private_key
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Create multiple, additional users with keypair
|
#### Create multiple, additional users with keypair
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker run --rm \
|
$ docker run --rm \
|
||||||
--publish=1337:22 \
|
--publish=1337:22 \
|
||||||
@ -74,14 +86,17 @@ hermsi/alpine-sshd
|
|||||||
```
|
```
|
||||||
|
|
||||||
After the container is up you are able to ssh in it as one of the given users with a private-key that matches the provided public-key in authorized_keys for your desired user.
|
After the container is up you are able to ssh in it as one of the given users with a private-key that matches the provided public-key in authorized_keys for your desired user.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ ssh root@mydomain.tld -p 1337 -i /path/to/private_key
|
$ ssh root@mydomain.tld -p 1337 -i /path/to/private_key
|
||||||
```
|
```
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
While beeing very slim and vanilla this image is still highly customizable.
|
While beeing very slim and vanilla this image is still highly customizable.
|
||||||
|
|
||||||
#### Environment variables
|
#### Environment variables
|
||||||
|
|
||||||
| Variable | Possible Values | Default value | Explanation |
|
| Variable | Possible Values | Default value | Explanation |
|
||||||
|:-----------------:|:-----------------:|:----------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------:|
|
|:-----------------:|:-----------------:|:----------------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------:|
|
||||||
| ROOT_LOGIN_UNLOCKED | 'true' or 'false' | 'false' | Whether to enable or disable login as 'root' user |
|
| ROOT_LOGIN_UNLOCKED | 'true' or 'false' | 'false' | Whether to enable or disable login as 'root' user |
|
||||||
@ -90,8 +105,10 @@ While beeing very slim and vanilla this image is still highly customizable.
|
|||||||
| USER_LOGIN_SHELL | any existing shell | `/bin/bash` | Choose the desired default shell for all additional users. If the configured shell is not existent, a fallback to `/bin/ash` is applied |
|
| USER_LOGIN_SHELL | any existing shell | `/bin/bash` | Choose the desired default shell for all additional users. If the configured shell is not existent, a fallback to `/bin/ash` is applied |
|
||||||
|
|
||||||
### Extending this image
|
### Extending this image
|
||||||
|
|
||||||
This image is designed to be as slim and vanilla as possible.
|
This image is designed to be as slim and vanilla as possible.
|
||||||
If you need additional Tools like `git` , I definetly recommend to build your own image on top of `alpine-sshd`:
|
If you need additional Tools like `git` , I definetly recommend to build your own image on top of `alpine-sshd`:
|
||||||
|
|
||||||
```Dockerfile
|
```Dockerfile
|
||||||
FROM hermsi/alpine-sshd:latest
|
FROM hermsi/alpine-sshd:latest
|
||||||
|
|
||||||
@ -100,5 +117,6 @@ RUN apk add --no-cache \
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Use with docker-compose
|
### Use with docker-compose
|
||||||
|
|
||||||
I built this image in order to use it along with a nginx and fpm-php container for transferring files via sftp.
|
I built this image in order to use it along with a nginx and fpm-php container for transferring files via sftp.
|
||||||
If you are interested in a Dockerfile which fulfills this need: [this way](https://github.com/Hermsi1337/docker-compose/blob/master/full_php_dev_stack/docker-compose.yml)
|
If you are interested in a Dockerfile which fulfills this need: [this way](https://github.com/Hermsi1337/docker-compose/blob/master/full_php_dev_stack/docker-compose.yml)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user