Skip to content

Commit e681055

Browse files
author
Adriano Santos
committed
scratch docker
1 parent 5f646cb commit e681055

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

examples/Dockerfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM lua:5.4-alpine AS builder
2+
3+
RUN apk add --no-cache \
4+
make \
5+
gcc \
6+
musl-dev \
7+
git \
8+
protobuf \
9+
protobuf-dev
10+
11+
RUN git clone https://github.com/starwing/lua-protobuf && \
12+
cd lua-protobuf && \
13+
make && \
14+
make install
15+
16+
WORKDIR /app
17+
18+
COPY . .
19+
20+
RUN luarocks make spawn-sdk-1.0-0.rockspec && \
21+
make generate-proto
22+
23+
FROM lua:5.4-alpine
24+
25+
WORKDIR /app
26+
27+
COPY --from=builder /usr/local/lib/lua/5.4/ /usr/local/lib/lua/5.4/
28+
COPY --from=builder /app/src/ ./src/
29+
COPY --from=builder /app/examples/ ./examples/
30+
COPY --from=builder /app/protos/generated/ ./protos/generated/
31+
32+
ENV SPAWN_SIDECAR_HOST=spawn-sidecar
33+
ENV SPAWN_SIDECAR_PORT=8091
34+
35+
CMD ["lua", "examples/main.lua"]

0 commit comments

Comments
 (0)