mirror of
https://git.phreedom.club/localhost_frssoft/compy.git
synced 2024-11-27 02:21:34 +00:00
parent
e505655338
commit
7a40f35b33
23
Dockerfile
Normal file
23
Dockerfile
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
FROM ubuntu:16.04
|
||||||
|
MAINTAINER Barna Csorogi <barnacs@justletit.be>
|
||||||
|
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive apt-get update
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||||
|
libjpeg8 \
|
||||||
|
openssl \
|
||||||
|
ssl-cert
|
||||||
|
|
||||||
|
WORKDIR /opt/compy
|
||||||
|
COPY \
|
||||||
|
compy \
|
||||||
|
docker.sh \
|
||||||
|
/opt/compy/
|
||||||
|
|
||||||
|
# TODO: configure HTTP BASIC authentication
|
||||||
|
# TODO: user-provided certificates
|
||||||
|
ENV \
|
||||||
|
CERTIFICATE_DOMAIN="localhost"
|
||||||
|
|
||||||
|
EXPOSE 9999
|
||||||
|
ENTRYPOINT ["./docker.sh"]
|
10
README.md
10
README.md
|
@ -89,6 +89,16 @@ compy -host :9999
|
||||||
|
|
||||||
For compression, transcoding and minification options, see `compy --help`
|
For compression, transcoding and minification options, see `compy --help`
|
||||||
|
|
||||||
|
Docker Usage
|
||||||
|
------------
|
||||||
|
|
||||||
|
Andrew Gaul publishes unofficial Docker images at
|
||||||
|
https://hub.docker.com/r/andrewgaul/compy/ . You can configure via:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo docker run --name=compy --env CERTIFICATE_DOMAIN=example.com --publish 9999:9999 andrewgaul/compy
|
||||||
|
```
|
||||||
|
|
||||||
References
|
References
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|
15
docker.sh
Executable file
15
docker.sh
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
openssl req -x509 -newkey rsa:2048 -nodes -keyout cert.key -out cert.crt -days 3650 -subj "/CN=${CERTIFICATE_DOMAIN}"
|
||||||
|
openssl req -x509 -newkey rsa:2048 -nodes -keyout ca.key -out ca.crt -days 3650 -subj "/CN=${CERTIFICATE_DOMAIN}"
|
||||||
|
|
||||||
|
echo 'Generated server certificate:'
|
||||||
|
cat cert.crt
|
||||||
|
echo
|
||||||
|
echo 'Generated CA certificate:'
|
||||||
|
cat ca.crt
|
||||||
|
|
||||||
|
exec ./compy \
|
||||||
|
-cert cert.crt -key cert.key \
|
||||||
|
-ca ca.crt -cakey ca.key \
|
||||||
|
:9999
|
Loading…
Reference in a new issue