Skip to content

Commit a161057

Browse files
authored
feat(op-acceptor): add Go binary to docker image. (#223)
1 parent edef7d7 commit a161057

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

op-acceptor/.goreleaser.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ project_name: op-acceptor
77

88
before:
99
hooks:
10-
# You may remove this if you don't use go modules.
1110
- go mod tidy
1211

1312
builds:

op-acceptor/Dockerfile

+12
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,23 @@ RUN just build
1111

1212
FROM alpine:3.21
1313

14+
# Install Go binary
15+
# (we copy Go directly from the builder stage for simplicity and consistency)
16+
COPY --from=builder /usr/local/go /usr/local/go
17+
ENV PATH="/usr/local/go/bin:${PATH}"
18+
ENV GOPATH="/go"
19+
ENV PATH="${GOPATH}/bin:${PATH}"
20+
1421
WORKDIR /app
1522
RUN addgroup -S app && adduser -S app -G app && \
1623
mkdir -p /devnets && \
1724
chown -R app:app /devnets
1825

26+
# Modify ownership of /go to app user (as we need write permissions)
27+
RUN mkdir -p /go && \
28+
mkdir -p /go/pkg /go/bin /go/src && \
29+
chown -R app:app /go
30+
1931
COPY --from=builder /app/bin/op-acceptor /app/
2032
COPY op-acceptor/example-validators.yaml /app/
2133
USER app

0 commit comments

Comments
 (0)