Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
49 lines (35 loc) · 1.58 KB

File metadata and controls

49 lines (35 loc) · 1.58 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# DO NOT run docker build against this file directly. Instead using ./build_bb_docker.sh as that
# one sets the various ARG used in the Dockerfile
# After build
# $ docker run --init --rm --name bb bytebase/bb
FROM golang:1.21.5 as bb
ADD go.mod go.sum /
RUN go mod download
ARG VERSION="development"
ARG GO_VERSION="1.21.5"
ARG GIT_COMMIT="unknown"
ARG BUILD_TIME="unknown"
ARG BUILD_USER="unknown"
WORKDIR /bb-build
COPY . .
# -ldflags="-w -s" means omit DWARF symbol table and the symbol table and debug information
RUN GOOS=linux GOARCH=amd64 go build \
--tags "release" \
-ldflags="-w -s -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.version=${VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.goversion=${GO_VERSION}' -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.gitcommit=${GIT_COMMIT}' -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.buildtime=${BUILD_TIME}' -X 'github.com/bytebase/bytebase/backend/bin/bb/cmd.builduser=${BUILD_USER}'" \
-o bb \
./backend/bin/bb/main.go
# Use debian because mysql requires glibc.
FROM debian:bookworm-slim as monolithic
ARG VERSION="development"
ARG GIT_COMMIT="unknown"
ARG BUILD_TIME="unknown"
ARG BUILD_USER="unknown"
# See https://github.com/opencontainers/image-spec/blob/master/annotations.md
LABEL org.opencontainers.image.version=${VERSION}
LABEL org.opencontainers.image.revision=${GIT_COMMIT}
LABEL org.opencontainers.image.created=${BUILD_TIME}
LABEL org.opencontainers.image.authors=${BUILD_USER}
COPY --from=bb /bb-build/bb /usr/local/bin/
ENV OPENSSL_CONF /etc/ssl/
CMD ["version"]
ENTRYPOINT ["bb"]
Morty Proxy This is a proxified and sanitized view of the page, visit original site.