-
Notifications
You must be signed in to change notification settings - Fork 32
/
Dockerfile
53 lines (44 loc) · 1.25 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Use an official Node.js runtime as a parent image
FROM node:10-alpine
# Set the working directory in the container
WORKDIR /app
# Install dependencies required for Python build
RUN apk add --no-cache \
git \
wget \
gcc \
g++ \
make \
zlib-dev \
libffi-dev \
openssl-dev \
bzip2-dev \
xz-dev \
sqlite-dev \
ncurses-dev \
readline-dev \
tk-dev
# Download and install Python 3.10.14
RUN wget https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz && \
tar xzf Python-3.10.14.tgz && \
cd Python-3.10.14 && \
./configure --enable-optimizations && \
make altinstall && \
cd .. && \
rm -rf Python-3.10.14 Python-3.10.14.tgz
# Create symlinks
RUN ln -s /usr/local/bin/python3.10 /usr/local/bin/python3 && \
ln -s /usr/local/bin/python3.10 /usr/local/bin/python && \
ln -s /usr/local/bin/pip3.10 /usr/local/bin/pip3 && \
ln -s /usr/local/bin/pip3.10 /usr/local/bin/pip
# Copy files to the working directory
COPY . .
# Configure npm & install npm packages
RUN npm config set python $(which python3)
RUN npm install && npm rebuild node-sass
# Default port
ENV PORT=8080
# Expose the port the app runs on
EXPOSE ${PORT}
# Command to run the application
CMD ["npx", "quasar", "build"]