forked from jsntv200/docker-ruby-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
25 lines (19 loc) · 782 Bytes
/
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
ARG RUBY_VERSION=2.5
ARG NODE_VERSION=10.15
FROM node:$NODE_VERSION-alpine AS nodejs
FROM ruby:$RUBY_VERSION-alpine
MAINTAINER Jason Taylor <[email protected]>
RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
&& apk add --no-cache \
libstdc++ \
bash
COPY --from=nodejs /usr/local/bin/node /usr/local/bin/
COPY --from=nodejs /usr/local/lib/node_modules /usr/local/lib/node_modules
COPY --from=nodejs /opt/ /opt/
RUN ln -sf /usr/local/bin/node /usr/local/bin/nodejs \
&& ln -sf ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
&& ln -sf ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx \
&& ln -sf /opt/yarn*/bin/yarn /usr/local/bin/yarn \
&& ln -sf /opt/yarn*/bin/yarnpkg /usr/local/bin/yarnpkg
CMD ["bash"]