Skip to content

Instantly share code, notes, and snippets.

@Syuparn
Created March 14, 2021 12:01
Show Gist options
  • Save Syuparn/a01342f25649b07a58836ab5924dd9cd to your computer and use it in GitHub Desktop.
Save Syuparn/a01342f25649b07a58836ab5924dd9cd to your computer and use it in GitHub Desktop.
dapr-contrib dev environment
version: '3'
services:
dev:
build:
context: .
dockerfile: Dockerfile.dapr-contrib.dev
tty: true
# https://github.com/dapr/components-contrib/blob/master/docs/developing-component.md
FROM golang:1.16-buster
RUN cd $GOPATH/src
# Clone dapr
RUN mkdir -p github.com/dapr/dapr && \
git clone https://github.com/dapr/dapr.git github.com/dapr/dapr
# Clone component-contrib
RUN mkdir -p github.com/dapr/components-contrib && \
git clone https://github.com/dapr/components-contrib.git github.com/dapr/components-contrib
# Validating with Dapr core
RUN cd github.com/dapr/dapr && \
go mod edit -replace github.com/dapr/components-contrib=../components-contrib && \
# nesseccary for Go 1.16+
go mod tidy && \
make DEBUG=1 build && \
cd $GOPATH/src
WORKDIR $GOPATH/github.com/dapr/dapr/dist/linux_amd64/debug
# run ./daprd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment