Initial attempt at docker compliance tests.

This commit is contained in:
Tom Alexander
2020-04-12 14:37:54 -04:00
parent 542c2c4536
commit db575d145e
8 changed files with 115 additions and 11 deletions

22
Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
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