File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
11
FROM node:alpine
2+
LABEL maintainer="Code Climate <[email protected]>"
23

34
RUN adduser -u 9000 -D app
45

56
WORKDIR /usr/src/app
67

7-
COPY package.json yarn.lock ./
8+
COPY package.json yarn.lock engine.json ./
89

910
RUN yarn install && \
10-
chown -R app:app ./
11+
chown -R app:app ./ && \
12+
apk add --no-cache --virtual .dev-deps jq && \
13+
export csslint_version=$(yarn --json list --pattern csslint 2>/dev/null | jq -r '.data.trees[0].name' | cut -d@ -f2) && \
14+
cat engine.json | jq '.version = .version + "/" + env.csslint_version' > /engine.json && \
15+
apk del .dev-deps
1116

1217
COPY . ./
1318

19+
COPY . /usr/src/app
20+
1421
USER app
1522

16-
COPY . /usr/src/app
23+
VOLUME /code
24+
WORKDIR /code
1725

1826
CMD ["/usr/src/app/bin/csslint"]
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ image:
44
docker build -t codeclimate/codeclimate-csslint .
55

66
test: image
7-
docker run --rm codeclimate/codeclimate-csslint npm run test
7+
docker run --rm codeclimate/codeclimate-csslint sh -c "cd /usr/src/app && npm run test"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "CSSLint",
3+
"description": "CSSLint is a tool to help point out problems with your CSS code.",
4+
"maintainer": {
5+
"name": "Code Climate",
6+
7+
},
8+
"languages": [
9+
"CSS"
10+
],
11+
"version": "2.0.0",
12+
"spec_version": "0.3.1"
13+
}

0 commit comments

Comments
 (0)