Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
validator
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
validator
Commits
33a49bea
Commit
33a49bea
authored
Mar 22, 2024
by
贾浩@五瓣科技
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update makefile
parent
de55026e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
6 deletions
+46
-6
Dockerfile
Dockerfile
+1
-5
Dockerfile.proxy
Dockerfile.proxy
+41
-0
Makefile
Makefile
+4
-1
No files found.
Dockerfile
View file @
33a49bea
...
...
@@ -3,8 +3,6 @@ FROM golang:1.21-alpine AS base
# Set up dependencies
ENV
PACKAGES git openssh-client build-base
RUN
sed
-i
's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g'
/etc/apk/repositories
# Install dependencies
RUN
apk add
--update
$PACKAGES
...
...
@@ -12,13 +10,11 @@ RUN apk add --update $PACKAGES
RUN
mkdir
-p
./validator
COPY
./ ./validator/
RUN
go
env
-w
GOPROXY
=
"https://goproxy.cn,direct"
RUN
git clone https://code.wuban.net.cn/odysseus/odysseus-protocol.git
FROM
base AS build
RUN
cd
witness
&&
go mod tidy
&&
go build
-v
-o
/tmp/validator ./cmd/validator
RUN
cd
validator
&&
go mod tidy
&&
go build
-v
-o
/tmp/validator ./cmd/validator
FROM
alpine
...
...
Dockerfile.proxy
0 → 100644
View file @
33a49bea
FROM golang:1.21-alpine AS base
# Set up dependencies
ENV PACKAGES git openssh-client build-base
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
# Install dependencies
RUN apk add --update $PACKAGES
# Add source files
RUN mkdir -p ./validator
COPY ./ ./validator/
RUN go env -w GOPROXY="https://goproxy.cn,direct"
RUN git clone https://code.wuban.net.cn/odysseus/odysseus-protocol.git
FROM base AS build
RUN cd validator && go mod tidy && go build -v -o /tmp/validator ./cmd/validator
FROM alpine
WORKDIR /app
COPY ./config.toml ./config.toml
VOLUME /app/config.toml
VOLUME /app/data
COPY --from=build /tmp/validator /usr/bin/validator
COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod u+x /usr/local/bin/entrypoint.sh
EXPOSE 20010 20012
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
\ No newline at end of file
Makefile
View file @
33a49bea
...
...
@@ -26,7 +26,10 @@ dev:
go build
$(BUILD_FLAGS)
-v
-o
=
${
GOBIN
}
/
$@
-gcflags
"all=-N -l"
./cmd/validator
docker
:
docker build
-t
validator:latest .
docker build
-t
validator:latest
-f
Dockerfile .
docker-proxy
:
docker build
-t
validator:latest
-f
Dockerfile.proxy .
clean
:
rm
-rf
build
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment