FROM docker.io/rust:1.67-alpine3.17 AS builder RUN apk add --no-cache \ musl-dev \ wasm-pack \ make RUN rustup target add wasm32-unknown-unknown ADD . /src WORKDIR /src RUN make release RUN adduser -D woweb RUN sed -i 's|ws://localhost:3000/ws|wss://woweb.vanwa.ch/ws|' dist/assets/index.js FROM docker.io/alpine:3.17 COPY --from=builder /etc/passwd /etc/passwd COPY --from=builder /src/dist/woweb "/opt/woweb" COPY --from=builder /src/dist/assets "/opt/assets" EXPOSE 3000 WORKDIR /opt USER woweb CMD ["/opt/woweb", "0.0.0.0:3000"]