-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (23 loc) · 888 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (23 loc) · 888 Bytes
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
FROM rust:latest
# Create required directories
RUN mkdir /app /config
WORKDIR /app
# Install required packages
RUN apt-get update && apt-get install -y \
python3-virtualenv \
python3-pip \
default-mysql-client \
&& rm -rf /var/lib/apt/lists/*
# Clone Mozilla's syncstorage-rs and build it
RUN git clone https://github.com/mozilla-services/syncstorage-rs ./
RUN cargo install --path ./syncserver --no-default-features --features=syncstorage-db/mysql --locked
RUN cargo install diesel_cli --no-default-features --features 'mysql'
# Setup the Python virtual environment
RUN virtualenv venv
RUN /app/venv/bin/pip install -r requirements.txt
RUN /app/venv/bin/pip install -r tools/tokenserver/requirements.txt
RUN /app/venv/bin/pip install pyopenssl==22.1.0
# Copy stage 1 script and set its permissions
COPY stage2.sh /
RUN chmod +x /stage2.sh
ENTRYPOINT ["/stage2.sh"]