Skip to content

Commit

Permalink
Merge pull request #6 from optimism-java/ci
Browse files Browse the repository at this point in the history
feat: add dockerfile
  • Loading branch information
fearlessfe authored Dec 5, 2024
2 parents ab79219 + 1d88049 commit 7a7abe3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM --platform=linux/amd64 golang:1.23 as builder

WORKDIR /app

COPY . .
RUN go env -w GOPROXY=https://goproxy.cn,direct
# RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build ./cmd/shisui/main.go
RUN make shisui


FROM --platform=linux/amd64 ubuntu:22.04

COPY --from=builder /app/build/bin/shisui /usr/local/bin/app

EXPOSE 8545 9009/udp

ENTRYPOINT [ "app" ]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ shisui:

#? shisui-image: Build shisui image
shisui-image:
docker build -t ghcr.io/optimism-java/shisui:latest -f Dockerfile.portal .
docker build -t ghcr.io/optimism-java/shisui:latest -f Dockerfile .

#? fmt: Ensure consistent code formatting.
fmt:
Expand Down
4 changes: 0 additions & 4 deletions internal/version/vcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
package version

import (
"fmt"
"runtime/debug"
"time"
)
Expand All @@ -47,9 +46,6 @@ type VCSInfo struct {

// VCS returns version control information of the current executable.
func VCS() (VCSInfo, bool) {
fmt.Println("vcs")
fmt.Println(gitCommit)
fmt.Println(gitDate)
if gitCommit != "" {
// Use information set by the build script if present.
return VCSInfo{Commit: gitCommit, Date: gitDate}, true
Expand Down
2 changes: 1 addition & 1 deletion storage/pebble/storage.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ethpepple
package pepple

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion storage/pebble/storage_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ethpepple
package pepple

import (
"testing"
Expand Down

0 comments on commit 7a7abe3

Please sign in to comment.