Skip to content

Commit

Permalink
Move analysis Dockerfile into analysis/ dir. (#78)
Browse files Browse the repository at this point in the history
This simplifies things so that we don't have to copy the analysis dir
anymore.

Also modify the build_docker script to build the server image as well.
  • Loading branch information
oliverchang committed May 27, 2021
1 parent 299485c commit a869cd8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 25 deletions.
4 changes: 2 additions & 2 deletions build/analysis/Dockerfile → analysis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.16.3 as build
FROM golang:1.16.3@sha256:f7d3519759ba6988a2b73b5874b17c5958ac7d0aa48a8b1d84d66ef25fa345f1 as build
WORKDIR /src
COPY analysis/ ./
COPY . ./
RUN go build cmd/analyze.go && go build cmd/worker.go

FROM ubuntu:21.04@sha256:be154cc2b1211a9f98f4d708f4266650c9129784d0485d4507d9b0fa05d928b6
Expand Down
File renamed without changes.
16 changes: 0 additions & 16 deletions build/analysis/daemon.json

This file was deleted.

21 changes: 14 additions & 7 deletions build/build_docker.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
#!/bin/bash
#!/bin/bash -ex

REGISTRY=gcr.io/ossf-malware-analysis
IMAGES=(
ANALYSIS_IMAGES=(
node
python
ruby
)

for image in "${IMAGES[@]}"; do
for image in "${ANALYSIS_IMAGES[@]}"; do
docker build --squash -t $REGISTRY/$image $image
docker push $REGISTRY/$image
done

rm -rf analysis/analysis
cp -r ../analysis analysis/
docker build --squash -t $REGISTRY/analysis analysis
docker push $REGISTRY/analysis
OTHER_IMAGES=(
analysis
server
)

for image in "${OTHER_IMAGES[@]}"; do
pushd ../$image
docker build --squash -t $REGISTRY/$image .
docker push $REGISTRY/$image
popd
done

0 comments on commit a869cd8

Please sign in to comment.