Skip to content

Commit

Permalink
updated dockerfile and makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
akash4sh committed Oct 17, 2023
1 parent 83ba755 commit 371f0b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tracetest-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
type=raw,value={{sha}},enable=${{ github.ref_type != 'tag' }}
flavor: |
latest=true
- name: Build server
run: make dist/tracetest-server

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand Down
14 changes: 1 addition & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
FROM golang:1.20 as builder

WORKDIR /tracetest
# Copy the Go Modules manifests
COPY ./ ./
#RUN go mod download

# Build
RUN make dist/tracetest-server
# RUN cd server
# RUN env GOOS=linux CGO_ENABLED=0 GO111MODULE=on /usr/local/go/bin/go build -o tracetest-server

FROM alpine

WORKDIR /app

COPY --from=builder /tracetest/tracetest-server /app/tracetest-server
COPY --from=builder ./tracetest-server /app/tracetest-server

# Adding /app folder on $PATH to allow users to call tracetest cli on docker
ENV PATH="$PATH:/app"
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,4 @@ vendor: go.mod go.sum
@go mod tidy
@go mod download
@go mod vendor
@go mod tidy
@go mod tidy

0 comments on commit 371f0b0

Please sign in to comment.