Created
October 10, 2018 09:09
-
-
Save derianpt/696d7a787049846dae1dae1b13a9d615 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:latest | |
# Install tools required for project (postgres, git, gcc, curl, glide) less | |
# likely to change, so put it up here to take advantage of cache | |
RUN apk add postgresql;\ | |
apk add git; \ | |
apk add build-base; \ | |
apk add curl; \ | |
curl https://glide.sh/get | sh; | |
# Set working directory | |
WORKDIR /go/src/github.com/balibone/web-server | |
# Copy over glide files. Build cache will only be invalidated if glide files were changed. | |
COPY glide.* ./ | |
# Copy over bash script used to install CLI tools. Build cache will only be | |
# invalidated if this bash script was changed. | |
COPY get_dependencies.sh ./ | |
# Install CLI tools & dependecies | |
RUN /bin/sh ./get_dependencies.sh &&\ | |
glide install | |
# Copy over source code | |
COPY . . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment