Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build and packaging updates #13

Merged
merged 1 commit into from
Apr 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

*dapper*
!Dockerfile.dapper
bin/
4 changes: 2 additions & 2 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ RUN wget -O - ${!DOCKER_URL} > /usr/bin/docker && chmod +x /usr/bin/docker
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash

RUN wget -O - https://storage.googleapis.com/golang/go1.11.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \
go get github.com/rancher/trash && go get github.com/golang/lint/golint
RUN wget -O - https://storage.googleapis.com/golang/go1.12.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local
RUN go get github.com/rancher/trash && go get golang.org/x/lint/golint

ENV DAPPER_SOURCE /go/src/github.com/rancher/local-path-provisioner
ENV DAPPER_OUTPUT ./bin
Expand Down
9 changes: 3 additions & 6 deletions package/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM ubuntu:16.04
FROM alpine:latest

RUN apt-get update && apt-get install -y curl vim nfs-common iproute dnsutils iputils-ping telnet
COPY bin /bin

COPY bin /usr/local/sbin/

VOLUME /usr/local/sbin
CMD ["local-path-provisioner"]
ENTRYPOINT ["/bin/local-path-provisioner"]
2 changes: 1 addition & 1 deletion scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ cd $(dirname $0)/..
VERSION=${VERSION:-$(./scripts/version)}

mkdir -p bin
[ "$(uname)" != "Darwin" ] && LINKFLAGS="-extldflags -static -s"
[ "$(uname)" != "Darwin" ] && LINKFLAGS="-extldflags -static -s -w"
CGO_ENABLED=0 go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/local-path-provisioner