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

Docker file #311

Closed
wants to merge 2 commits into from
Closed
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
11 changes: 7 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/bash

export CGO_ENABLED=0
export GOPATH=$(go env GOPATH)

# shellcheck disable=SC2164
go build -o ./bin/flydb-server cmd/server/cli/flydb-server.go
go build -o ./bin/flydb-client cmd/client/cli/flydb-client.go
go build -gcflags=-trimpath=$GOPATH -asmflags=-trimpath=$GOPATH -ldflags "-s -w -extldflags '-static'" -o ./bin/flydb-server cmd/server/cli/flydb-server.go
go build -o ./bin/flydb-client cmd/client/cli/flydb-client.go
echo "build success"

echo "Now you can run the follow command:
start server: ./bin/flydb-server
start client: ./bin/flydb-client 127.0.0.1:8999"

start client: ./bin/flydb-client 127.0.0.1:8999"
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ubuntu:18.04
FROM alpine:latest

WORKDIR /app

COPY bin/flydb-server /app/flydb-server

RUN chmod +x /app/flydb-server

CMD ["/app/flydb-server"]
ENTRYPOINT ["/app/flydb-server"]