File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ .bundle /
2
+ .gem_rbs_collection /
3
+ .git /
4
+ .yardoc /
5
+ doc /
6
+ vendor /
Original file line number Diff line number Diff line change @@ -131,6 +131,19 @@ Run `bundle exec rake build_all`.
131
131
132
132
See ` bundle exec rake -T ` for more tasks.
133
133
134
+ ### Build in docker container
135
+ e.g.
136
+
137
+ ``` bash
138
+ docker build --file=_dockerfiles/alpine.dockerfile -t go-gem-wrappper .
139
+ # or
140
+ docker build --file=_dockerfiles/alpine.dockerfile -t go-gem-wrappper --build-arg GO_VERSION=1.23 --build-arg RUBY_VERSION=3.4 .
141
+
142
+ docker run --rm -it go-gem-wrappper sh
143
+ ```
144
+
145
+ Run ` bundle exec rake build_all ` in container.
146
+
134
147
### See ` godoc ` in local
135
148
``` bash
136
149
go install golang.org/x/tools/cmd/godoc@latest
Original file line number Diff line number Diff line change
1
+ ARG GO_VERSION=1.23
2
+ ARG RUBY_VERSION=3.4
3
+ ARG ALPINE_VERSION=3.21
4
+
5
+ FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS golang
6
+
7
+ FROM ruby:${RUBY_VERSION}-alpine${ALPINE_VERSION}
8
+
9
+ RUN apk update && \
10
+ apk add --no-cache git alpine-sdk libffi-dev
11
+
12
+ COPY --from=golang /usr/local/go /usr/local/go
13
+ COPY --from=golang /go /go
14
+
15
+ ENV PATH=/go/bin:/usr/local/go/bin:$PATH \
16
+ GOPATH=/go \
17
+ GOLANGCI_LINT_VERSION=v1.60.3
18
+
19
+ RUN wget -O- -nv https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s ${GOLANGCI_LINT_VERSION}
20
+
21
+ WORKDIR /app
22
+
23
+ COPY Gemfile Gemfile.lock ./
24
+ COPY _gem/go_gem.gemspec _gem/
25
+ COPY _gem/lib/go_gem/version.rb _gem/lib/go_gem/
26
+
27
+ RUN bundle config --local path vendor/bundle/ && \
28
+ bundle config --local deployment true && \
29
+ bundle install --jobs 4
30
+
31
+ COPY . .
You can’t perform that action at this time.
0 commit comments