-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker: change release image build to debian, roll quay back to v6
leveldown segfaults on alpine node8 but seems find on debian. change out alpine build for a debian build and roll quay build back to node 6 since it doesn't support multi stage builds
- Loading branch information
1 parent
55c0adb
commit 684c49d
Showing
2 changed files
with
16 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
# -- NODE 8 | ||
FROM mhart/alpine-node:8 AS base | ||
# -- BASE | ||
FROM buildpack-deps:jessie-curl AS base | ||
ENV storage__path /var/data/skyring | ||
ENV NODE_ENV=production | ||
RUN apt-get update && apt-get install -y \ | ||
build-essential curl g++ make tar python | ||
|
||
ENV NODE_VERSION 8.4.0 | ||
|
||
RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.xz" | ||
RUN tar -xJf "node-v$NODE_VERSION-linux-x64.tar.xz" -C /usr/local --strip-components=1 | ||
|
||
# -- BUILD | ||
FROM base AS build | ||
|
||
COPY package*.json /opt/skyring/ | ||
WORKDIR /opt/skyring | ||
RUN npm install && mv node_modules prod_node_modules | ||
|
||
RUN apk update && \ | ||
apk upgrade && \ | ||
mkdir -p /var/data/skyring && \ | ||
apk add python make g++ git && \ | ||
npm install | ||
|
||
RUN mv node_modules prod_node_modules | ||
|
||
FROM base AS skyring | ||
# -- RELEASE | ||
FROM debian:jessie-slim as skyring | ||
RUN mkdir -p /var/data/skyring | ||
WORKDIR /opt/skyring | ||
VOLUME /etc | ||
VOLUME /var/data/skyring | ||
|
||
COPY --from=build /usr/local/bin/node /usr/local/bin/node | ||
COPY --from=build /usr/local/bin/npm /usr/local/bin/npm | ||
COPY --from=build /usr/local/include/node /usr/local/include | ||
COPY --from=build /opt/skyring/prod_node_modules ./node_modules | ||
COPY . . | ||
CMD ["node", "index.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM mhart/alpine-node:8 | ||
FROM mhart/alpine-node:6 | ||
COPY . /opt/skyring | ||
WORKDIR /opt/skyring | ||
RUN apk update && \ | ||
|