Skip to content

Instantly share code, notes, and snippets.

@syntaqx
Created February 3, 2019 06:00
Show Gist options
  • Save syntaqx/ffb6f7ddea5508e2cd4412fa1e6a067e to your computer and use it in GitHub Desktop.
Save syntaqx/ffb6f7ddea5508e2cd4412fa1e6a067e to your computer and use it in GitHub Desktop.
docker-compose volume binding
version: '3.6'
services:
example:
build:
context: .
dockerfile: Dockerfile
volumes:
- /c/Users/syntaqx/go/src/github.com/syntaqx/example:/go/src/github.com/syntaqx/example
ARG GO_VERSION=1.11
ARG ALPINE_VERSION=3.8
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder
WORKDIR /go/src/github.com/syntaqx/example
RUN ls -alh
ENTRYPOINT ["go"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment