Skip to content

Instantly share code, notes, and snippets.

@spalt08
Created September 4, 2019 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spalt08/6e792823d826d8409cd4b7520b4697a4 to your computer and use it in GitHub Desktop.
Save spalt08/6e792823d826d8409cd4b7520b4697a4 to your computer and use it in GitHub Desktop.
Go live-reload snippet
# Production environment (alias: base)
FROM golang:1.12-alpine as base
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
WORKDIR /home/my-project
# Development environment
# Unfortunately, linux alpine doesn't have fswatch package by default, so we will need to download source code and make it by outselves.
FROM base as dev
RUN apk add --no-cache autoconf automake libtool gettext gettext-dev make g++ texinfo curl
WORKDIR /root
RUN wget https://github.com/emcrisostomo/fswatch/releases/download/1.14.0/fswatch-1.14.0.tar.gz
RUN tar -xvzf fswatch-1.14.0.tar.gz
WORKDIR /root/fswatch-1.14.0
RUN ./configure
RUN make
RUN make install
WORKDIR /home/my-project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment