-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,32 @@ | ||
# Build stage | ||
FROM golang:1.21-alpine AS go-builder | ||
RUN apk update | ||
RUN apk add --no-cache ca-certificates | ||
RUN apk add --update gcc musl-dev | ||
RUN update-ca-certificates | ||
|
||
RUN apk update && | ||
apk add --no-cache ca-certificates gcc musl-dev && | ||
update-ca-certificates | ||
|
||
WORKDIR $GOPATH/src/github.com/ngshiheng/michelin-my-maps | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
COPY . . | ||
RUN go build -o /bin/mym ./cmd/mym | ||
RUN CGO_ENABLED=1 go build -o /bin/mym ./cmd/mym | ||
|
||
# Final stage | ||
FROM datasetteproject/datasette | ||
|
||
RUN datasette install datasette-publish-vercel | ||
|
||
COPY --from=go-builder /bin/mym /bin/mym | ||
|
||
ARG VERCEL_TOKEN | ||
ENV VERCEL_TOKEN=${VERCEL_TOKEN} | ||
RUN apt-get update -yq | ||
RUN apt-get -yq install curl gnupg ca-certificates | ||
RUN curl -L https://deb.nodesource.com/setup_18.x | bash | ||
RUN apt-get install -yq nodejs | ||
RUN npm i -g vercel | ||
|
||
RUN apk update && | ||
apk add --no-cache curl gnupg nodejs && | ||
curl -fsSL https://deb.nodesource.com/setup_18.x | sh - && | ||
npm i -g vercel | ||
|
||
COPY . . | ||
|
||
CMD ["./docker/docker-entrypoint.sh"] |