forked from gokalkan/gokalkan
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwtest.Dockerfile
More file actions
48 lines (38 loc) · 1.19 KB
/
wtest.Dockerfile
File metadata and controls
48 lines (38 loc) · 1.19 KB
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
FROM ubuntu:20.04
# set timezone
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ="Asia/Almaty"
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# install dependencies
ARG DEPS=" \
git \
gcc \
libpcsclite-dev \
zlib1g-dev \
libltdl7 \
curl \
"
RUN apt-get update && apt-get install -y ${DEPS}
# install golang
ARG GO_VERSION=1.17.10
RUN curl -sL https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz -o /tmp/go${GO_VERSION}.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf /tmp/go${GO_VERSION}.linux-amd64.tar.gz && rm /tmp/go${GO_VERSION}.linux-amd64.tar.gz
# golang config
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
# download go modules
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
# install CA certs
ARG CA_DIRECTORY=./internal/ca-test
RUN mkdir /usr/local/share/ca-certificates/extra
COPY ${CA_DIRECTORY}/*.crt /usr/local/share/ca-certificates/extra/
COPY ${CA_DIRECTORY}/*.pem /etc/ssl/certs/
# RUN update-ca-certificates
# install kalkan libs
COPY ./sdk/libkalkancryptwr-64.so /usr/lib/
# build app
COPY . .
RUN go test -v -run . ./internal/testdata/wtest/