Skip to content

Commit

Permalink
Update builders
Browse files Browse the repository at this point in the history
  • Loading branch information
danil-lashin committed Feb 29, 2020
1 parent da3690e commit 27ce56d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
12 changes: 1 addition & 11 deletions scripts/DOCKER/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
FROM ubuntu:18.04

RUN apt-get update && apt-get install -y software-properties-common build-essential wget
RUN apt-get install -y libsnappy-dev
RUN wget https://github.com/google/leveldb/archive/v1.20.tar.gz && \
tar -zxvf v1.20.tar.gz && \
cd leveldb-1.20/ && \
make && \
cp -r out-static/lib* out-shared/lib* /usr/local/lib/ && \
cd include/ && \
cp -r leveldb /usr/local/include/ && \
ldconfig && \
rm -f v1.20.tar.gz
RUN wget https://dl.google.com/go/go1.13.5.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.13.5.linux-amd64.tar.gz
RUN wget https://dl.google.com/go/go1.14.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.14.linux-amd64.tar.gz

ENV GOPATH=$HOME/go
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
Expand Down
2 changes: 1 addition & 1 deletion scripts/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ echo "==> Building for mac os..."
CGO_ENABLED=1 CGO_LDFLAGS="-lsnappy" go build -tags "minter gcc" -ldflags "-s -w -X ${GIT_IMPORT}.GitCommit=${GIT_COMMIT}" -o "build/pkg/darwin_amd64/minter" ./cmd/minter

echo "==> Building for linux in docker"
docker run -t -v ${PWD}:/go/src/github.com/MinterTeam/minter-go-node/ -i f4938e2f152b sh -c 'CGO_ENABLED=1 CGO_LDFLAGS="-lsnappy" go build -tags "minter gcc" -ldflags "-s -w -X ${GIT_IMPORT}.GitCommit=${GIT_COMMIT}" -o "build/pkg/linux_amd64/minter" ./cmd/minter/'
docker run -t -v ${PWD}:/go/src/github.com/MinterTeam/minter-go-node/ -i minter-builder-1:latest sh -c 'CGO_ENABLED=1 CGO_LDFLAGS="-lsnappy" go build -tags "minter gcc" -ldflags "-s -w -X ${GIT_IMPORT}.GitCommit=${GIT_COMMIT}" -o "build/pkg/linux_amd64/minter" ./cmd/minter/'

# Zip all the files.
echo "==> Packaging..."
Expand Down

0 comments on commit 27ce56d

Please sign in to comment.