Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
Adjust Dockerfiles to speed up builds during development (#1992)
Browse files Browse the repository at this point in the history
* Adjust Dockerfiles to speed up builds during development

* Improve comments to clarify the intention
  • Loading branch information
rvandegrift authored and blueandgold committed Sep 10, 2018
1 parent a8322ea commit 38a7fe0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
9 changes: 5 additions & 4 deletions install/docker/base
Expand Up @@ -12,15 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Do not add forseti source in this file to avoid rebuilding base during development.

FROM ubuntu:18.04

# Expose our source so we can read in dependencies.
ADD . /forseti-security/
WORKDIR /forseti-security/
# Add the apt dependencies
ADD install/dependencies/apt_packages.txt /tmp

# Install host dependencies.
RUN apt-get update -qq 1> /dev/null && \
apt-get install -qq -y $(cat install/dependencies/apt_packages.txt | grep -v "#" | xargs) 1> /dev/null && \
apt-get install -qq -y $(cat /tmp/apt_packages.txt | grep -v "#" | xargs) 1> /dev/null && \
rm -rf /var/lib/apt/lists/*

# Install the CloudSDK for `gcloud`.
Expand Down
7 changes: 5 additions & 2 deletions install/docker/forseti
Expand Up @@ -15,8 +15,8 @@
ARG BASE_IMAGE=forseti/base
FROM ${BASE_IMAGE}

# Expose our source so we can install Forseti Security.
ADD . /forseti-security/
# Add pip requirements file
ADD requirements.txt /forseti-security/
WORKDIR /forseti-security/

# Install Forseti Security dependencies.
Expand All @@ -27,5 +27,8 @@ RUN pip install -q --upgrade pip==9.0.3
RUN pip install -q --upgrade setuptools wheel 1> /dev/null
RUN pip install -q --upgrade -r requirements.txt 1> /dev/null

# Expose our source so we can install Forseti Security.
ADD . /forseti-security/

# Install Forseti Security.
RUN python setup.py install 1> /dev/null

0 comments on commit 38a7fe0

Please sign in to comment.