Skip to content

Commit fe84848

Browse files
committed
Added dockerfile and updated target api version to 1.1.7.
1 parent b2d981b commit fe84848

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM node:10.14.2-alpine
2+
3+
# Set environment variables
4+
ENV XBROWSERSYNC_API_VERSION 1.1.7
5+
6+
WORKDIR /usr/src/api
7+
8+
# Download release and unpack
9+
RUN wget -q -O release.tar.gz https://github.com/xBrowserSync/api/archive/v$XBROWSERSYNC_API_VERSION.tar.gz \
10+
&& tar -C . -xzf release.tar.gz \
11+
&& rm release.tar.gz \
12+
&& mv api-$XBROWSERSYNC_API_VERSION/* . \
13+
&& rm -rf api-$XBROWSERSYNC_API_VERSION/
14+
15+
# Install dependencies
16+
RUN npm install --only=production
17+
18+
# Expose port and start api
19+
EXPOSE 8080
20+
CMD [ "node", "dist/api.js"]

0 commit comments

Comments
 (0)