Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
FROM node:10.15.3-alpine
FROM node:12.19.0-alpine

RUN apk add --no-cache --update bash
RUN apk add --no-cache --update --virtual build git python make gcc g++
WORKDIR /polyfill
ARG POLYFILL_TAG='v4.8.1'
ARG POLYFILL_TAG='v4.33.1'
ARG NODE_ENV='production'
RUN \
git clone https://github.com/Financial-Times/polyfill-service . && \
git checkout ${POLYFILL_TAG} && \
rm -rf .git && \
yarn install && \
sed -i.bak -e 's,^node,exec node,' start_server.sh && \
mv start_server.sh /bin/ && \
chmod a+x /bin/start_server.sh && \
apk del build
git clone https://github.com/Financial-Times/polyfill-service . && \
git checkout ${POLYFILL_TAG} && \
rm -rf .git && \
yarn install && \
sed -i.bak -e 's,^node,exec node,' start_server.sh && \
mv start_server.sh /bin/ && \
chmod a+x /bin/start_server.sh && \
apk del build
ENV PORT 8801

EXPOSE ${PORT}

CMD ["/bin/start_server.sh", "server/index.js"]
# Use to debug if things don't start:
# CMD ["/bin/sh", "-c", "sleep 3600"]