forked from facundoolano/google-play-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (25 loc) · 780 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
26
27
28
29
30
31
32
33
34
35
36
37
# Use the official Node.js image as base
FROM node:18-alpine AS base
# Set metadata labels
LABEL maintainer="Srikanth <[email protected]>" \
version="1.5.0" \
description="Docker image for running Google Play API"
# Create and set the working directory
WORKDIR /app
FROM base as build
# Copy only the package.json and package-lock.json first to leverage Docker caching
COPY --link package-lock.json package.json ./
RUN npm install -g [email protected]
# Install dependencies
RUN npm install
COPY --link . .
RUN npm run generateoas
RUN npm prune
FROM base
# Copy the rest of the application code
COPY --from=build /app /app
# Expose port 3000
EXPOSE 3000
# Set the user to 'node' and run the application using npm start
USER node
CMD [ "npm", "start" ]