Skip to content
This repository was archived by the owner on Nov 6, 2021. It is now read-only.

Dockerize a Go on Rails application

B1nj0y edited this page Jan 8, 2018 · 19 revisions

One of Golang's smart features is its app could be compiled as a single executable binary. That's convenient for release and deployment.

But we can't compile the assets like stylesheet, javascript and images in this binary by a common go build. Of course there're some solutions indeed, but I don't take it an idiomatic way, and sometimes it's not fit well with some framework like Gin.

In fact Docker is very nice solution for Golang web app release and deployment. So go-on-rails will generate a Dockerfile at meanwhile when generating the application. You can find a Dockerfile in the go_app folder.

Now just run make image will build a docker image for the generated Golang app.

Clone this wiki locally