-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM alpine:3.3 | ||
|
||
ADD repositories /etc/apk/ | ||
RUN set -ex \ | ||
&& apk add --update bash ca-certificates gcc musl-dev \ | ||
go openssl git linux-headers g++ make \ | ||
libexecinfo-dev leveldb-dev libaio-dev \ | ||
libseccomp-dev argp-standalone snappy-dev | ||
|
||
VOLUME ["/source"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM alpine:3.3 | ||
|
||
MAINTAINER nizq <[email protected]> | ||
|
||
ADD repositories /etc/apk/ | ||
RUN echo "===> Adding dependency..." && \ | ||
apk add --update zlib openssl libstdc++ libexecinfo leveldb libaio \ | ||
libseccomp curl jq tcpdump snappy && \ | ||
rm -rf /var/cache/apk/* | ||
|
||
ADD steno* /usr/bin/ | ||
ADD libtestimony.so /usr/lib/ | ||
|
||
VOLUME ["/etc/stenographer", "/data"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
docker build -t nizq/steno-build . | ||
docker run --rm -ti \ | ||
-v `pwd`:/source \ | ||
nizq/steno-build /source/build-steno.sh | ||
|
||
cp Dockerfile.final final/Dockerfile | ||
cp repositories final | ||
cd final | ||
docker build -t nizq/stenographer . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh | ||
|
||
HTTPS_PROXY=https://10.0.0.1:8123 | ||
|
||
SOURCE=/source | ||
BUILD_DIR=$SOURCE/build | ||
FINAL_DIR=$SOURCE/final | ||
|
||
export GOPATH=${SOURCE}/go | ||
STENO_DIR=${GOPATH}/src/github.com/nizq/stenographer | ||
STENOTYPE_DIR=${STENO_DIR}/stenotype | ||
|
||
echo "===> Build testimony..." | ||
cd $BUILD_DIR | ||
if [ ! -d "testimony" ]; then | ||
git clone https://github.com/google/testimony.git | ||
fi | ||
cd testimony/c | ||
make | ||
cp -f -v libtestimony.a /usr/lib | ||
cp -f -v libtestimony.so /usr/lib | ||
cp -f -v libtestimony.so $FINAL_DIR/ | ||
cp -f -v testimony.h /usr/include | ||
|
||
echo "===> Install golang/x/net/context..." | ||
https_proxy=${HTTPS_PROXY} go get golang.org/x/net/context | ||
|
||
echo "===> Install stenographer..." | ||
go get github.com/nizq/stenographer | ||
|
||
echo "===> Build stenotype manually..." | ||
cd $STENOTYPE_DIR | ||
make | ||
|
||
echo "Collect files ..." | ||
cp -f -v $GOPATH/bin/stenographer $FINAL_DIR/ | ||
cp -f -v $STENO_DIR/stenocurl $FINAL_DIR/ | ||
cp -f -v $STENO_DIR/stenoread $FINAL_DIR/ | ||
cp -f -v $STENOTYPE_DIR/stenotype $FINAL_DIR/ |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
http://dl-4.alpinelinux.org/alpine/v3.3/main | ||
http://dl-4.alpinelinux.org/alpine/v3.3/community | ||
http://dl-4.alpinelinux.org/alpine/edge/testing |