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

Use multistage docker build #32

Merged
merged 4 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
FROM golang:1.20.3@sha256:bcc311ec9655c350df3899611fdf134806f97a3e3b2c06c2b5c0696428503814
FROM golang:1.20.3-alpine as builder
keynmol marked this conversation as resolved.
Show resolved Hide resolved

COPY scip-go /usr/bin/
COPY . /sources
WORKDIR /sources
RUN go build -o scip-go ./cmd/scip-go

FROM alpine:latest

COPY --from=builder /sources/scip-go /usr/bin/
CMD ["scip-go"]
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ scip-go
src lsif upload -github-token='${{ secrets.GITHUB_TOKEN }}' -no-progress
```

## Docker

To build a self-contained Docker container with the indexer, use
the following command:

```bash
docker build -t scip-go:latest .
```


keynmol marked this conversation as resolved.
Show resolved Hide resolved

# Contributing

Expand Down