You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
549 B
Docker

FROM rustlang/rust:nightly-alpine3.10
RUN apk --no-cache add bash git npm nodejs
# Create unprivileged user
RUN addgroup -S duster && adduser -S duster -G duster
# Install LinkedIn DustJS. Installing it globally before copying in
# the repo to avoid spamming the npm servers with every codebase
# change.
RUN npm install -g dustjs-linkedin
# Copy repo into duster user's directory
RUN mkdir /home/duster/duster
WORKDIR /home/duster/duster
COPY . .
RUN chown -R duster:duster /home/duster/duster
USER duster
RUN git clean -dfxq
RUN cargo build