-
Notifications
You must be signed in to change notification settings - Fork 47
/
Dockerfile.dev
43 lines (30 loc) · 979 Bytes
/
Dockerfile.dev
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
# Development Dockerfile to be run from the docker-compose.yml (run: docker compose up)
FROM python:3.11
ENV DEBIAN_FRONTEND=noninteractive
#COPY .nvmrc .
# $(cat .nvmrc)
RUN curl -sL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
RUN chmod +x ./nodesource_setup.sh && ./nodesource_setup.sh
RUN apt install -y nodejs
RUN pip install aider-chat
ENV user=sophia
ENV homedir=/home/sophia/
RUN useradd --create-home -g users sophia
WORKDIR $homedir
RUN mkdir ".husky"
COPY .husky/install.mjs .husky/install.mjs
COPY package*.json ./
RUN npm install
# Install Angular dependencies and build Angular app
WORKDIR $homedir/frontend
COPY frontend/package*.json ./
RUN npm install
# Set work directory back to home
WORKDIR $homedir
# Switch to non-root user
USER $user
ENV NODE_ENV=production
# In the frontend package.json the `ng serve` needs the arg --host 0.0.0.0 for it to be available from the host machine
EXPOSE 4200
EXPOSE 3000
CMD ["./bin/cmd-script"]