Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds working dockerfile #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM golang:1.7.1-onbuild
MAINTAINER Jimmy Mesta "jimmy.mesta@gmail.com"

RUN wget https://dl.eff.org/certbot-auto -P /usr/local/sbin && \
Copy link
Owner

Choose a reason for hiding this comment

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

I'm guessing you were downloading certbot so you could get a real cert, but it doesn't appear to be used anywhere in the RUN stanzas.

Copy link
Author

Choose a reason for hiding this comment

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

Removed Let's Encrypt support and using a self-signed cert only. We found that this app works well behind a LB / proxy and terminating TLS there with a valid certificate. I'm open to other suggestions though.

chmod a+x /usr/local/sbin/certbot-auto && \
git clone https://github.com/rawdigits/go-flashpaper

WORKDIR go-flashpaper
RUN go build

RUN openssl req \
-new \
-newkey rsa:4096 \
-days 365 \
-nodes \
-x509 \
-subj "/C=US/ST=Denial/L=DockerLand/O=Dis/CN=www.flashpaper.com" \
-keyout /go/src/app/go-flashpaper/server.key \
-out /go/src/app/go-flashpaper/server.crt

EXPOSE 8443

ENTRYPOINT ["./go-flashpaper"]