Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an Alpine image #753

Closed
bquenin opened this issue Oct 28, 2020 · 7 comments
Closed

Provide an Alpine image #753

bquenin opened this issue Oct 28, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@bquenin
Copy link

bquenin commented Oct 28, 2020

It would be great to publish an image based on Alpine in addition to the existing image.

You would only need to duplicate your existing Dockerfile and replace the FROM as follows FROM golang:alpine AS builder

If we have this Alpine image, it would be then very easy to include sqlc as part of a containerized build process such as:

# sqlc
# ---
FROM kyleconroy/sqlc:alpine AS sqlc

# ---
FROM golang:1.15.3-alpine3.12 AS builder
RUN apk --no-cache add make git curl
WORKDIR /build
COPY . .

COPY --from=sqlc /bin/sqlc /bin/sqlc
RUN make build

...
@kyleconroy kyleconroy added the enhancement New feature or request label Jan 25, 2021
@kyleconroy
Copy link
Collaborator

@bquenin I haven't gotten any other requests for this, so I'm going to go ahead and close this out. I did add multi-arch Docker builds about a month ago.

@graywolf-at-work
Copy link

Could this be reopened? I think having sqlc available in the alpine container would be great.

@roccoblues
Copy link
Contributor

I don't think it's currently possible to provide an alpine image. Version 1.15 added a dependency on wasmtime-go which currently doesn't build on alpine.

@kyleconroy
Copy link
Collaborator

We recently added a nowasm build tag, so it should be easy enough to use that when building an Alpine image.

@tspearconquest
Copy link

Hi, is there some way to download the nowasm build using go install ?

It's not a problem if not, but we're interested in using that build if it's available, rather than forking this repo to build it ourselves.

@roccoblues
Copy link
Contributor

go install supports the same -tags argument as go build. So something like

go install -tags=nowasm github.com/kyleconroy/sqlc/cmd/sqlc@latest

should work.

@tspearconquest
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants