Skip to content

Instantly share code, notes, and snippets.

@arowla
Created April 20, 2017 17:56
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save arowla/bff5fbb3aa79ed5a0abedda8c39bfca0 to your computer and use it in GitHub Desktop.
Save arowla/bff5fbb3aa79ed5a0abedda8c39bfca0 to your computer and use it in GitHub Desktop.
Docker-Goconvey
version: '3'
services:
goconvey:
build:
context: .
dockerfile: 'Dockerfile.testing'
args:
port: 9006
app_path: github.com/go-ozzo/ozzo-validation
volumes:
- ${GOPATH}/src:/go/src
ports:
- 9006:9006
FROM golang:1.7.5-alpine
USER root
ARG port
ARG app_path
ENV PORT=$port
ENV APP_NAME=github.com/smartystreets/goconvey
ENV APP_SRC_PATH=${GOPATH}/src/$app_path
EXPOSE ${PORT}
RUN echo "installing git" \
&& apk update \
&& apk add git \
&& echo "installing goconvey" \
&& go get ${APP_NAME} \
&& cd ${GOPATH}/src/${APP_NAME} \
&& go install
CMD goconvey -host=0.0.0.0 -port=${PORT} -workDir=${APP_SRC_PATH} -launchBrowser=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment