Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/fscm/docker-openvpn

Docker recipe to build an OpenVPN image
https://github.com/fscm/docker-openvpn

docker docker-image dockerfile easyrsa openvpn

Last synced: about 21 hours ago
JSON representation

Docker recipe to build an OpenVPN image

Awesome Lists containing this project

README

        

# OpenVPN for Docker

Docker image with OpenVPN.

## Synopsis

This script will create a Docker image with OpenVPN installed and with all
of the required initialization scripts.

The Docker image resulting from this script should be the one used to
instantiate an OpenVPN server.

## Getting Started

There are a couple of things needed for the script to work.

### Prerequisites

Docker, either the Community Edition (CE) or Enterprise Edition (EE), needs to
be installed on your local computer.

#### Docker

Docker installation instructions can be found
[here](https://docs.docker.com/install/).

### Build

In order to create a Docker image using this Dockerfile you need to run the
`docker` command with a few options.

```
docker image build --force-rm --no-cache --quiet --tag /:
```

* `` - *[required]* The user that will own the container image (e.g.: "johndoe").
* `` - *[required]* The container name (e.g.: "openvpn").
* `` - *[required]* The container tag (e.g.: "latest").
* `` - *[required]* The location of the Dockerfile folder.

A build example:

```
docker image build --force-rm --no-cache --quiet --tag johndoe/my_openvpn:latest .
```

To clean any __ image(s) left by the build process the following
command can be used:

```
docker image rm `docker image ls --filter "dangling=true" --quiet`
```

You can also use the following command to achieve the same result:

```
docker image prune -f
```

### Add Tags to the Docker Image

Additional tags can be added to the image using the following command:

```
docker image tag /:
```

### Push the image to Docker Hub

After adding an image to Docker, that image can be pushed to a Docker registry... Like Docker Hub.

Make sure that you are logged in to the service.

```
docker login
```

When logged in, an image can be pushed using the following command:

```
docker image push /:
```

Extra tags can also be pushed.

```
docker image push /:
```

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request

Please read the [CONTRIBUTING.md](CONTRIBUTING.md) file for more details on how
to contribute to this project.

## Versioning

This project uses [SemVer](http://semver.org/) for versioning. For the versions
available, see the [tags on this repository](https://github.com/fscm/docker-openvpn/tags).

## Authors

* **Frederico Martins** - [fscm](https://github.com/fscm)

See also the list of [contributors](https://github.com/fscm/docker-openvpn/contributors)
who participated in this project.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE)
file for details