Skip to content

Commit

Permalink
simpler client dockerfile (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanfarming authored Jul 27, 2022
1 parent 982e6a6 commit d0c4115
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
# ---- build stage ----
FROM debian:bullseye-slim as builder
RUN apt-get update -y && apt-get install -y curl \
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
FROM node:18-alpine as builder
workdir client
COPY . .
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install nodejs
RUN npm install -g yarn
RUN yarn && yarn run build

# ---- app stage ----
FROM debian:bullseye-slim
RUN apt-get update -y && apt-get install -y curl \
&& apt-get clean && rm -f /var/lib/apt/lists/*_*
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install nodejs
RUN npm install -g yarn
FROM node:18-alpine
WORKDIR "/app"
RUN chown nobody /app
COPY --from=builder --chown=nobody:root /client ./
Expand Down

0 comments on commit d0c4115

Please sign in to comment.