Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mscottblake/docker-margarita

A Docker container for running Margarita, a web front-end for Reposado.
https://github.com/mscottblake/docker-margarita

apple docker-container docker-margarita margarita reposado software-update softwareupdate sus

Last synced: about 9 hours ago
JSON representation

A Docker container for running Margarita, a web front-end for Reposado.

Awesome Lists containing this project

README

        

# docker-margarita
[![Build Status](https://img.shields.io/docker/automated/mscottblake/margarita.svg)](https://hub.docker.com/r/mscottblake/margarita/builds/) [![GitHub Stars](https://img.shields.io/github/stars/mscottblake/docker-margarita.svg)](https://github.com/mscottblake/docker-margarita/stargazers) [![Docker Stars](https://img.shields.io/docker/stars/mscottblake/margarita.svg)](https://hub.docker.com/r/mscottblake/margarita) [![Docker Pulls](https://img.shields.io/docker/pulls/mscottblake/margarita.svg)](https://hub.docker.com/r/mscottblake/margarita)

A Docker container for running [Margarita](https://github.com/jessepeterson/margarita), a web front-end for [Reposado](https://github.com/wdas/reposado).

# Note

If you make a change and the blue bar never stops scrolling, you likely have a permissions problems. This could occur if you perform a `repo_sync` and it creates new files. Those files will not have the proper permissions. To fix this, run the following commands.

```bash
docker exec margarita chgrp -R www-data /reposado
```
```bash
docker exec margarita chmod -R g+wr /reposado
```

# Usage Examples

## Example #1 - Basic

```bash
docker run --name margarita -d -p 8089:8089 mscottblake/margarita
```

## Example #2 - Using port 80

```bash
docker run --name margarita -d -p 80:8089 mscottblake/margarita
```

## Example #3 - Custom preferences.plist

By default, `LocalCatalogURLBase` is empty, so the updates aren't really being downloaded, just their metadata. To host the updates on-site, you need to specify a value for this variable. Any optional keys (`AppleCatalogURLs`, `PreferredLocalizations`, etc.) need to be loaded in this manner as well.

```bash
docker run --name margarita -d -p 8089:8089 -v /path/to/reposado/preferences.plist:/margarita/preferences.plist mscottblake/margarita
```

## Example #4 - Link to an existing reposado container

This example assumes the existence of a container named `reposado` from [mscottblake/reposado](https://hub.docker.com/r/mscottblake/reposado).

```bash
docker run --name margarita --volumes-from reposado -d -p 8089:8089 -v /path/to/reposado/preferences.plist:/margarita/preferences.plist mscottblake/margarita
```

## Example #5 - Add Basic Authentication

Authentication can be added by overriding `/extras.conf` with the `-v` flag. Contents of `extras.conf`:

```conf

AuthType Basic
AuthName "Authentication Required"
AuthUserFile "/margarita/.htpasswd"
Require valid-user

```

```bash
docker run --name margarita -d -p 8089:8089 -v /path/to/extras.conf:/extras.conf -v /path/to/valid-users:/margarita/.htpasswd mscottblake/margarita
```

Alternatively, the `.htpasswd` file could be created once the container has been created.

```bash
docker run --name margarita -d -p 8089:8089 -v /path/to/extras.conf:/extras.conf mscottblake/margarita

docker exec -it margarita htpasswd -c /margarita/.htpasswd USERNAME_1

docker exec -it margarita htpasswd /margarita/.htpasswd USERNAME_2
```

More examples of authentication blocks can be found in [GitHub](https://github.com/MScottBlake/docker-margarita/blob/master/extras.conf)

## Example #6 - Enabling SSL

SSL can be added by overriding `/extras.conf` with the `-v` flag. Contents of `extras.conf`:

```conf
SSLEngine on
SSLCertificateKeyFile /ssl/server.key
SSLCertificateFile /ssl/yourDomainName.crt
```

Make sure to include the certificate files.

```bash
docker run --name margarita -d -p 443:8089 -v /path/to/extras.conf:/extras.conf -v /path/to/server.key:/ssl/server.key -v /path/to/ssl/yourDomainName.crt:/ssl/yourDomainName.crt mscottblake/margarita
```