Permalink
Browse files

restructure

  • Loading branch information...
kcq committed Aug 7, 2017
1 parent ba2736c commit 6df60f9783709770229e760e029555038b36d553
View
@@ -1,8 +1,8 @@
FROM golang:latest
RUN mkdir -p /go/src/github.com/docker-slim/docker-slim
ADD . /go/src/github.com/docker-slim/docker-slim
WORKDIR /go/src/github.com/docker-slim/docker-slim/apps/docker-slim
WORKDIR /go/src/github.com/docker-slim/docker-slim/cmd/docker-slim
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o docker-slim .
WORKDIR /go/src/github.com/docker-slim/docker-slim/apps/docker-slim-sensor
WORKDIR /go/src/github.com/docker-slim/docker-slim/cmd/docker-slim-sensor
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o docker-slim-sensor .
View
@@ -9,7 +9,7 @@ build:
docker rm -f $(INSTANCE); true
docker build -f Dockerfile-build -t $(NAME)-build .
docker create --name $(INSTANCE) $(NAME)-build
docker cp $(INSTANCE):/go/src/github.com/$(NAME)/apps/docker-slim/docker-slim $(shell pwd)/docker-slim
docker cp $(INSTANCE):/go/src/github.com/$(NAME)/apps/docker-slim-sensor/docker-slim-sensor $(shell pwd)/docker-slim-sensor
docker cp $(INSTANCE):/go/src/github.com/$(NAME)/cmd/docker-slim/docker-slim $(shell pwd)/docker-slim
docker cp $(INSTANCE):/go/src/github.com/$(NAME)/cmd/docker-slim-sensor/docker-slim-sensor $(shell pwd)/docker-slim-sensor
docker rm $(INSTANCE)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -13,5 +13,5 @@ echo "installing bom tool (note: requires Go 1.8+)"
go get -v -u github.com/cloudimmunity/license-bill-of-materials
pushd $BDIR_GOPATH
license-bill-of-materials github.com/docker-slim/docker-slim/apps/docker-slim > $SDIR/../lib-licenses.json
license-bill-of-materials github.com/docker-slim/docker-slim/cmd/docker-slim > $SDIR/../lib-licenses.json
popd
View
@@ -11,7 +11,7 @@ export CGO_ENABLED=0
source ${SDIR}/env.sh
BDIR_GOPATH=${BDIR}/_gopath/src/github.com/docker-slim/docker-slim
pushd ${BDIR_GOPATH}/apps/docker-slim
pushd ${BDIR_GOPATH}/cmd/docker-slim
BUILD_TIME="$(date -u '+%Y-%m-%d_%I:%M:%S%p')"
TAG="current"
REVISION="current"
@@ -26,7 +26,7 @@ gox -osarch="linux/amd64" -ldflags "${LD_FLAGS}" -output "${BDIR_GOPATH}/bin/lin
gox -osarch="darwin/amd64" -ldflags "${LD_FLAGS}" -output "${BDIR_GOPATH}/bin/mac/docker-slim"
#gox -osarch="linux/arm" -output "$BDIR_GOPATH/bin/linux_arm/docker-slim"
popd
pushd ${BDIR_GOPATH}/apps/docker-slim-sensor
pushd ${BDIR_GOPATH}/cmd/docker-slim-sensor
gox -osarch="linux/amd64" -output="${BDIR_GOPATH}/bin/linux/docker-slim-sensor"
#gox -osarch="linux/arm" -output "$BDIR_GOPATH/bin/linux_arm/docker-slim-sensor"
popd
@@ -19,7 +19,7 @@ mkdir -p src/github.com/docker-slim
ln -sf $BDIR src/github.com/docker-slim/docker-slim
popd
pushd $BDIR_GOPATH/apps/docker-slim
pushd $BDIR_GOPATH/cmd/docker-slim
BUILD_TIME="$(date -u '+%Y-%m-%d_%I:%M:%S%p')"
TAG="current"
revision="current"
@@ -33,7 +33,7 @@ LD_FLAGS="-X github.com/docker-slim/docker-slim/utils.appVersionTag=${TAG} -X gi
gox -osarch="linux/amd64" -ldflags "${LD_FLAGS}" -output "$BDIR_GOPATH/bin/linux/docker-slim"
gox -osarch="darwin/amd64" -ldflags "${LD_FLAGS}" -output "$BDIR_GOPATH/bin/mac/docker-slim"
popd
pushd $BDIR_GOPATH/apps/docker-slim-sensor
pushd $BDIR_GOPATH/cmd/docker-slim-sensor
gox -osarch="linux/amd64" -output="$BDIR_GOPATH/bin/linux/docker-slim-sensor"
popd
popd
View
@@ -7,7 +7,7 @@ while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
SDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source $SDIR/env.sh
cd $BDIR/apps
cd $BDIR/cmd
gofmt -l -w -s .
cd $BDIR/master
gofmt -l -w -s .
View
@@ -7,7 +7,7 @@ while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
SDIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
source $SDIR/env.sh
cd $BDIR/apps
cd $BDIR/cmd
go tool vet .
golint ./...
cd $BDIR/consts

0 comments on commit 6df60f9

Please sign in to comment.