forked from Weitzman-MUSA-GeoCloud/assignment01
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
32 lines (26 loc) · 1.08 KB
/
Copy pathContainerfile
File metadata and controls
32 lines (26 loc) · 1.08 KB
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
# Use an LTS Ubuntu as a base image
FROM ubuntu:24.04
# Install the necessary system packages, and then clean up
RUN apt update && \
apt install -y \
postgresql-client \
nodejs npm \
python3 python3-pip python3-venv && \
apt clean
# Create a workspace directory
WORKDIR /workspace
# Copy the files with dependencies into the container
COPY package.json /workspace/package.json
COPY package-lock.json /workspace/package-lock.json
COPY requirements.txt /workspace/requirements.txt
# Use bash as the shell for any subsequent commands; this is necessary for
# activating the python virtual environment with the `source` command.
SHELL ["/bin/bash", "-c"]
# Install the node & python packages
RUN npm install && \
python3 -m venv env && \
source env/bin/activate && \
pip install -r requirements.txt
# Expect that the assignment's SQL files and linting configuration files will
# have been mounted into the container at /assignment01
CMD ["echo", "Please mount the assignment files into the container at /assignment01 and run the assignment scripts from there."]