-
-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (23 loc) · 603 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (23 loc) · 603 Bytes
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
FROM golang:1.18-alpine as build-dev
RUN set -ex; \
# build dependencies
apk add --no-cache --update --virtual .build-deps \
gcc \
make \
git \
musl-dev \
; \
mkdir -p ${GOPATH}/src ${GOPATH}/bin; \
# download
git clone --depth 1 https://github.com/noborus/trdsql $GOPATH/src/github.com/noborus/trdsql; \
cd $GOPATH/src/github.com/noborus/trdsql; \
# install
make; \
make install; \
cp /go/bin/trdsql /usr/local/bin/trdsql; \
# cleanup
rm -rf /go; \
apk del .build-deps
FROM alpine:latest
COPY --from=build-dev /usr/local/bin/trdsql /usr/local/bin/trdsql
ENTRYPOINT ["trdsql"]