This repository has been archived by the owner on Jun 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Dockerfile
64 lines (55 loc) · 2.18 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM mhart/alpine-node:latest
# Build-time metadata as defined at http://label-schema.org
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
ARG GIT_RESOURCE_VERSION="1.10.0"
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="npm-cache-resource" \
org.label-schema.description="a Concourse resource for caching dependencies downloaded by NPM - built on mhart/alpine-node." \
org.label-schema.url="https://ymedlop.github.io/npm-cache-resource" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/ymedlop/npm-cache-resource" \
org.label-schema.vendor="ymedlop" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0" \
org.label-schema.license="MIT"
RUN apk add --update \
openssl \
sed \
ca-certificates \
bash \
openssh \
make \
git \
jq \
libstdc++ \
libpng-dev \
nasm \
build-base \
python2 \
python2-dev \
# Fix problem with some dependencies: https://github.com/ymedlop/npm-cache-resource/issues/39
libtool \
automake \
autoconf \
nasm \
&& rm -rf /var/cache/apk/*
# according to Brian Clements, can't `git pull` unless we set these
RUN git config --global user.email "git@localhost" && \
git config --global user.name "git"
# install git resource (and disable LFS, which we happen not to need)
RUN mkdir -p /opt/resource/git && \
wget https://github.com/concourse/git-resource/archive/v${GIT_RESOURCE_VERSION}.zip -O /opt/resource/git/git-resource.zip && \
unzip /opt/resource/git/git-resource.zip -d /opt/resource/git && \
ls /opt/resource/git/git-resource-${GIT_RESOURCE_VERSION}/assets && \
mv /opt/resource/git/git-resource-${GIT_RESOURCE_VERSION}/assets/* /opt/resource/git && \
rm -r /opt/resource/git/git-resource.zip /opt/resource/git/git-resource-${GIT_RESOURCE_VERSION} && \
sed -i '/git lfs/s/^/echo /' /opt/resource/git/in
# install npm cache resource
ADD assets/ /opt/resource/
RUN mkdir /var/cache/git
RUN chmod +x /opt/resource/check /opt/resource/in /opt/resource/out
# install npm-clip-login to help us with the npm login
RUN npm install -g npm-cli-login bower
HEALTHCHECK NONE