-
Notifications
You must be signed in to change notification settings - Fork 41
/
Dockerfile
34 lines (30 loc) · 1.19 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
FROM python:3.10-bullseye
COPY . /workspaces/ubyssey.ca/
WORKDIR /workspaces/ubyssey.ca/
# Installs some basics
RUN apt-get update
RUN apt-get install -y git
RUN apt-get install -y curl
# Installs Node 14.x and npm 6.x
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs
# Install the Django app’s dependencies
RUN pip install -r requirements.txt
# Set up static files - clears old old version of node_modules that may be around, tides up new version
WORKDIR /workspaces/ubyssey.ca/ubyssey/static_src/
RUN rm -rf node_modules
RUN npm install
RUN npm install -g gulp
RUN npm rebuild node-sass
RUN gulp buildDev
RUN rm -rf node_modules
# See https://stackoverflow.com/questions/28372328/how-to-install-the-google-cloud-sdk-in-a-docker-image
# Downloading gcloud package
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz
# Installing the package
RUN mkdir -p /usr/local/gcloud \
&& tar -C /usr/local/gcloud -xvf /tmp/google-cloud-sdk.tar.gz \
&& /usr/local/gcloud/google-cloud-sdk/install.sh
# Adding the package path to local
ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin
WORKDIR /workspaces/ubyssey.ca/