Skip to content

Commit 385df4b

Browse files
committed
docker: reduce image size
1 parent a393b4f commit 385df4b

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ svelte/.idea/*
55
websocketServer/.idea/*
66

77
target/*
8+
9+
*.tar

Dockerfile

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@ COPY . .
55

66
RUN cargo install --path .
77

8-
FROM node:22.2.0-bookworm as run
8+
FROM node:22.2.0-alpine as run
99

1010
WORKDIR /app
1111

1212
COPY . .
1313

14-
RUN cd svelte && yarn install && yarn run build && cd ..
15-
RUN cd websocketServer && yarn install && cd ..
14+
RUN cd svelte && yarn install && yarn run build && cd .. \
15+
&& cd websocketServer && yarn install && cd .. \
16+
&& yarn cache clean
1617

1718
COPY exec_all.sh exec_all.sh
1819
RUN chmod +x exec_all.sh
1920

2021
# RUN apt-get update && apt-get install -y extra-runtime-dependencies && rm -rf /var/lib/apt/lists/*
2122
COPY --from=builder /usr/local/cargo/bin/brain_fuck_interpreter /usr/local/bin/brain_fuck_interpreter
2223

23-
CMD ["bash", "exec_all.sh"]
24+
CMD ["sh", "exec_all.sh"]

0 commit comments

Comments
 (0)