Skip to content

Using the docker container as a build step? #1740

@polds

Description

@polds

What do you want to change?

This seems related to #753 , without building my own sqlc container I'm trying to figure out if I can include sqlc as part of my build process. In particular I need to pass in a custom sqlc.yaml location so am trying to do something like this (which doesn't work):

FROM kjconroy/sqlc AS sqlc-generate

WORKDIR /src
COPY . . 
RUN sqlc generate -f configs/sqlc.yaml

FROM golang:1.18 AS builder

COPY --from=sqlc-generate /src/gen gen
...

The container has sqlc as the entrypoint so it's called by default, but by that point flag parsing has happened so something like RUN generate -f configs/sqlc.yaml doesn't work

What database engines need to be changed?

No response

What programming language backends need to be changed?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions