Try the fastest and simplest way to install ONLYOFFICE

Https in docker. How to..?

Questions/problems on Docker

Https in docker. How to..?

Postby Kpol » Wed Oct 28, 2015 2:24 pm

Hi,

I read topic (Locked) saying to refer here : https://github.com/ONLYOFFICE/Docker-CommunityServer#running-onlyoffice-community-server-using-https.
Some instruction I dont get, help!

Code: Select all
sudo docker run -i -t -d -p 80:80  -p 443:443 \
    -v /opt/onlyoffice/Data:/var/www/onlyoffice/Data  onlyoffice/communityserver

Heu... What? ... :?:

Please refer the docker run command options for the --env-file flag where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command.

Get out from docker and run command
Code: Select all
docker --env-file

... Then ? ... :?:
User avatar
Kpol
 
Posts: 97
Joined: Fri Feb 06, 2015 5:58 am
Location: Bangkok, Thailand.

Re: Https in docker. How to..?

Postby Kpol » Wed Oct 28, 2015 2:38 pm

I need to run :
Code: Select all
docker run --env-file

Where? Outside docker ?

ONLYOFFICE_HTTPS_HSTS_ENABLED: Advanced configuration option for turning off the HSTS configuration. Applicable only when SSL is in use. Defaults to true.

How i use this argument?

PS : WHY ONLYOFFICE DONT PROPOSE HTTPS BY DEFAULT !???? :(((((
User avatar
Kpol
 
Posts: 97
Joined: Fri Feb 06, 2015 5:58 am
Location: Bangkok, Thailand.

Re: Https in docker. How to..?

Postby AnaMih » Fri Oct 30, 2015 2:21 pm

1. Please, specify what exactly would you like to know about the line
"sudo docker run -i -t -d -p 80:80 -p 443:443 \ -v /opt/onlyoffice/Data:/var/www/onlyoffice/Data onlyoffice/communityserver"
sudo docker run - creates a new docker image with the following parameters
-i -t -d - you can read here.
The -i flag starts an interactive container.
The -t flag creates a pseudo-TTY that attaches stdin and stdout.
the -d flag which tells Docker to run the container in the background.
-p 80:80 -p 443:443 - open ports 80 and 443. The -P flag tells Docker to map any required network ports inside a container to your host. This lets view a web application.
The -v flag mounts the current working directory into the container.

You can read About parameters, for example, here.

2. docker --env-file

You should create a file with creation parameters for a new docker image first
It will content all available configuration params (and save you from writing a potentially long docker run command)
Follow the link to find an example ("The --env-file flag" section)
Then you should create a new container using the --env-file flag with the path to your configuration file
ONLYOFFICE_HTTPS_HSTS_ENABLED also can be set using environment variables

If it doesn't help please describe how you create and use the configuration file

If you'd like to run a new container using HTTPS follow the instructions here.

Please, note that all container parameters should be set when creating a new docker container. For example like that:
sudo docker run -i -t -d -p 80:80 -p 5222:5222 -p 443:443 -v /app/onlyoffice/CommunityServer/Logs:/var/log/onlyoffice -v /app/onlyoffice/CommunityServer/Data:/var/www/onlyoffice/Data -v /app/onlyoffice/CommunityServer/MySQL:/var/lib/mysql --link onlyoffice-mail-server:mail_server --link onlyoffice-document-server:document_server onlyoffice/communityserver
User avatar
AnaMih
 
Posts: 264
Joined: Mon Aug 25, 2014 10:15 am

Re: Https in docker. How to..?

Postby Kpol » Thu Nov 05, 2015 12:55 pm

Hi,

I install onlyoffice by docker one click install (ubuntu server). All works well by http. Now i need to config for it httpS (I use self-generate certificates and its ready to use).
Can you explain "simply" what i do now ? I read https://github.com/ONLYOFFICE/Docker-CommunityServer#running-onlyoffice-community-server-using-https and really dont get at all what to do... Sorry :( ....
User avatar
Kpol
 
Posts: 97
Joined: Fri Feb 06, 2015 5:58 am
Location: Bangkok, Thailand.

Re: Https in docker. How to..?

Postby Kpol » Fri Nov 06, 2015 11:57 am

Region01.png
Region01.png (14.78 KiB) Viewed 6090 times

Region02.png
Region02.png (12.17 KiB) Viewed 6090 times

Suggestions please ... ? :|
User avatar
Kpol
 
Posts: 97
Joined: Fri Feb 06, 2015 5:58 am
Location: Bangkok, Thailand.

Re: Https in docker. How to..?

Postby Kpol » Fri Nov 06, 2015 12:20 pm

My case is :

1 - I install ooffice with docker using one click install

2 - i create certificates CA selfsign..

3 - i run this in SSH ..
Code: Select all
sudo docker run -i -t -d -p 80:80  -p 443:443 \
    -v /opt/onlyoffice/Data:/var/www/onlyoffice/Data  onlyoffice/communityserver


4 - then i (suppose to ) use https with my ooffice ?? ... :cry: :cry:

5 - because it dont work ....
Code: Select all
7ee44d4e4d5fb1491cf4c662de695bfc43857df2d86e69c9ed691dd83724d75b
Error response from daemon: Cannot start container 7ee44d4e4d5fb1491cf4c662de695bfc43857df2d86e69c9ed691dd83724d75b: Bind for 0.0.0.0:443 failed: port is already allocated

I seriously dont have idea how of this and why? ....

Code: Select all
You can easily run Document Server using secure connection with Docker image

easily ?? LOL ! :)))
User avatar
Kpol
 
Posts: 97
Joined: Fri Feb 06, 2015 5:58 am
Location: Bangkok, Thailand.

Re: Https in docker. How to..?

Postby Kpol » Fri Nov 06, 2015 12:45 pm

Ok ok ... I ask in another way, only one simple question :

With ooffice installed with one click install Docker, how i do to install "easy" httpS ?


:| :|
User avatar
Kpol
 
Posts: 97
Joined: Fri Feb 06, 2015 5:58 am
Location: Bangkok, Thailand.

Re: Https in docker. How to..?

Postby Merc » Tue Nov 10, 2015 5:14 am

Take a look at this post: viewtopic.php?f=37&t=6106

It was a big help to me in getting OO up and running. I am now running the Docker server under Ubuntu 14.04 LTS using a real SSL cert but I had to get the basic server working first. Adding SSL was a whole other project (as I think you know).

Get the basic server working first with a self-signed cert and then upgrade to a real cert.
Merc
 
Posts: 52
Joined: Tue Jun 09, 2015 2:29 am

Re: Https in docker. How to..?

Postby CinnabarJack » Tue Nov 10, 2015 5:27 am

This post has some useful info too regarding SSL and environment variables: viewtopic.php?f=37&t=6106&p=8269#p8269
CinnabarJack
 
Posts: 15
Joined: Thu May 21, 2015 10:27 pm

Re: Https in docker. How to..?

Postby Kpol » Tue Nov 10, 2015 10:29 am

hello,

Thanks all for reply but i cannot wait to manage with docker so i install manual without docker and it now run on https ;)... (i use a real comodo csa and its even better !)

thanks!

ps : http://dev.onlyoffice.org/viewtopic.php?f=23&t=5690 ;)
User avatar
Kpol
 
Posts: 97
Joined: Fri Feb 06, 2015 5:58 am
Location: Bangkok, Thailand.

Next

Return to Docker Version

Who is online

Users browsing this forum: No registered users and 1 guest