Skip to content

Commit

Permalink
skywire docker image working
Browse files Browse the repository at this point in the history
  • Loading branch information
ivcosla committed Jul 5, 2019
1 parent 8f8975b commit 556f0dc
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 43 deletions.
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
bin
skywire
ci_scripts
apps
integration
25 changes: 0 additions & 25 deletions docker/images/builder/Dockerfile

This file was deleted.

13 changes: 0 additions & 13 deletions docker/images/builder/install.sh

This file was deleted.

34 changes: 30 additions & 4 deletions docker/images/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
ARG builder=node-builder
# Builder
# ARG builder_base=golang:alpine
ARG base=alpine
FROM golang:alpine as builder

FROM ${builder} as builder
ARG CGO_ENABLED=0
ENV CGO_ENABLED=${CGO_ENABLED} \
GOOS=linux \
GOARCH=amd64 \
GO111MODULE=on

FROM ${base} as base
COPY . skywire

WORKDIR skywire

RUN go build -mod=vendor -tags netgo -ldflags="-w -s" \
-o skywire-node cmd/skywire-node/skywire-node.go &&\
go build -mod=vendor -ldflags="-w -s" -o ./apps/skychat.v1.0 ./cmd/apps/skychat &&\
go build -mod=vendor -ldflags="-w -s" -o ./apps/helloworld.v1.0 ./cmd/apps/helloworld &&\
go build -mod=vendor -ldflags="-w -s" -o ./apps/socksproxy.v1.0 ./cmd/apps/therealproxy &&\
go build -mod=vendor -ldflags="-w -s" -o ./apps/socksproxy-client.v1.0 ./cmd/apps/therealproxy-client &&\
go build -mod=vendor -ldflags="-w -s" -o ./apps/SSH.v1.0 ./cmd/apps/therealssh &&\
go build -mod=vendor -ldflags="-w -s" -o ./apps/SSH-client.v1.0 ./cmd/apps/therealssh-client


## Resulting image
FROM ${base} as node-runner

COPY --from=builder /go/skywire/skywire-node skywire-node
COPY --from=builder /go/skywire/apps bin/apps
COPY --from=builder /go/skywire/docker/images/builder/update.sh update.sh
COPY --from=builder /go/skywire/docker/images/node/update.sh update.sh

RUN ./update.sh

ENTRYPOINT [ "./skywire-node" ]

# default target
FROM node-runner
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if type apk > /dev/null; then

apk update
apk upgrade
apk add --no-cache ca-certificates openssl
apk add --no-cache ca-certificates openssl iproute2
update-ca-certificates --fresh
apk add iproute2
fi

0 comments on commit 556f0dc

Please sign in to comment.