Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

dockerization #62

Merged
merged 2 commits into from
Jul 7, 2018
Merged

dockerization #62

merged 2 commits into from
Jul 7, 2018

Conversation

nierdz
Copy link
Contributor

@nierdz nierdz commented Jul 2, 2018

Added Dockerfile and entrypoint.sh
Inside entrypoint.sh, a certificate is installed so you need to provide a domain name during docker run.
The certificate is automatically renew using a cronjob. The certificate is not renew every time you run the container cause it uses a volume to persist this data.

To build server:

cd webminerpool
docker build -t webminerpool {--build-arg DONATION_LEVEL=0.05} .

To run it:

docker run -d -p 80:80 -p 8181:8181 -e DOMAIN=mydomain.com webminerpool

You absolutely need to set a domain name.
The 80:80 bind is used to obtain a certificate.
The 8181:8181 bind is used for server itself.

If you want to bind these ports to a specific IP, you can do this:

docker run -d -p xx.xx.xx.xx:80:80 -p xx.xx.xx.xx:8181:8181 -e DOMAIN=mydomain.com webminerpool

@notgiven688
Copy link
Owner

Thank you for the contribution. It is under consideration.

@nierdz
Copy link
Contributor Author

nierdz commented Jul 5, 2018

I just made some modifications and add a .dockerignore file

@notgiven688 notgiven688 merged commit 7a2c1c9 into notgiven688:master Jul 7, 2018
@ghost
Copy link

ghost commented Jul 14, 2018

@nierdz thanks for this. did you seen any unofficial stretch (ideally slim) or alpine builds of mono while putting this together?

@nierdz
Copy link
Contributor Author

nierdz commented Jul 16, 2018

@jhabdas I didn't want to use unofficial image so I stick with https://hub.docker.com/_/mono/
I tried to use slim image but unless server.exe was running it wasn't sending hashes. As I do not know anything to dotNET, I didn't try to debug this and only use non slim image. By the way, mono images are based on debian jessie slim.

@marcelobcortes
Copy link

i'd have put --restart unless-stopped to prevent statistics being nulled.

@ghost
Copy link

ghost commented Nov 24, 2018

Great job here, @nierdz. I learned a lot from your elegant implementation.

@ghost
Copy link

ghost commented Feb 25, 2019

@marcelobcortes assuming you're using this could you provide your experience with the acme.sh cert renewal? my observation is that it it didn't work automatically under my current set-up (which doesn't provide a www subdomain as some of the scripts expect.

/root/acme.sh/acme.sh --install

# Generate SSL cert
/root/.acme.sh/acme.sh --issue --standalone -d ${DOMAIN} -d www.${DOMAIN}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcelobcortes
Copy link

sorry i'm using something else

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants