Skip to content

Commit

Permalink
ZBIO-120: changes but not working on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
taher27 committed Mar 9, 2020
1 parent ca31e8a commit 0327119
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
13 changes: 13 additions & 0 deletions pub-sub/producer/bin/producer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
set -x
echo "Calling Sample producer"

echo $PWD
ls -l /zbsample/zbsample_producer

export SERVER_CRT=/zbsample/server.crt
touch i_am_here.txt
PROG=$(ls -lart . | grep zbsample | awk '{print $NF}')
ldd $PROG
./$PROG

echo "Done"
Binary file not shown.
14 changes: 9 additions & 5 deletions pub-sub/producer/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
FROM golang:alpine
FROM zbbase:alpine
MAINTAINER VIVEK K B <kbvivek@zb.io>
LABEL Description="This image is used to start producer " Vendor="Zettabytes" Version="1.0"

# ADD producer binary location
ADD bin /producer
WORKDIR /producer
ENV SERVER_CRT=/producer/server.crt
ENTRYPOINT ["./producer"]
ADD bin /zbsample
WORKDIR /zbsample

ENV SERVER_CRT="/zbsample/server.crt"
#ENTRYPOINT ["/zbsample/producer"]

ENTRYPOINT ./producer.sh
CMD [default]
4 changes: 2 additions & 2 deletions pub-sub/producer/makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
all:
export GOPRIVATE="github.com/ZB-io/*"
GOOS=linux GOARCH=amd64 go build -o bin/producer .
GOOS=linux GOARCH=amd64 go build -o bin/zbsample_producer
cp ../../security/cert/server.crt bin/
ifdef NODOCKER
echo "DO NOT BUILD IMAGE"
Expand All @@ -9,4 +9,4 @@ else
endif

clean:
rm -f bin/*
rm -f bin/zbsample_producer

0 comments on commit 0327119

Please sign in to comment.