Mocking AWS PG Extensions The project I am working on uses RDS with aws_s3 (& aws_commons) postgres extensions. However these extensions are also need postgres docker container used in the CI for integration tests to not break the migrations. A mock extension was built to keep the tests from breaking. Create .control files Create the schema for the module being created Add the functions in the schema in sql files
again this is for my self reference or for easy copy-paste for new projects. Assume this is the production grade program we need to dockerize and run. package main import "fmt" func main() { fmt.Println("saying hello to the world") } Basic #-NAME: Dockerfile multistage build FROM golang:1.14-alpine as builder WORKDIR /go/src/ COPY main.go . COPY vendor ./vendor RUN go build -o main . FROM alpine:latest RUN apk --no-cache add ca-certificates WORKDIR / COPY --from=0 /go/src/github.