Skip to content
Docker image for auto-recompiling and auto-restarting Golang server
Dockerfile Shell
Branch: master
Clone or download
Boban Acimovic
Boban Acimovic tag golang to 1.12.6
Latest commit 945ffce Jun 13, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode fix badges Oct 15, 2018
Dockerfile tag golang to 1.12.6 Jun 13, 2019
LICENSE Initial commit Oct 15, 2018 add run arguments Feb 24, 2019
reflex.conf initial commit Oct 15, 2018

Docker image for auto-recompiling and auto-restarting Golang server

GitHub GitHub tag Docker Automated build Docker Build Status


  • uses Go modules (Go version >=1.11)
  • uses cespare/reflex to watch .go files changes and recompile/restart your server application
  • optionally compiles binary with data race detector

Feature requests


  • your server application is expected to run on port 3000 inside the container, but you can actually use any port

Support on Beerpay

Beerpay Beerpay

How to use

Place docker-compose.yml in your project root and run 'docker-compose up --build'.

docker-compose.yml example

version: "3.7"

    image: acim/go-reflex
      - RUN_ARGS=server
      - .:/app
      - 3000:3000

Optional environment variables

  • RACE_DETECTOR=1 - used to turn on data race detector in the compiled binary
  • RUN_ARGS - used to add commands and flags in the call of your binary
You can’t perform that action at this time.