-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (30 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
40 lines (30 loc) · 1.02 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
FROM azul/zulu-openjdk:17.0.7-17.42.19
ARG UTBOT_GO_CLI
WORKDIR /usr/src/
# Install UTBot Go CLI
ARG UTBOT_GO_CLI
ARG CREATE_GO_MODULE_SCRIPT
WORKDIR /usr/src/
COPY ${UTBOT_GO_CLI} .
COPY ${CREATE_GO_MODULE_SCRIPT} .
# Install Go
RUN apt-get update && \
apt-get install -y wget && \
wget https://go.dev/dl/go1.19.linux-amd64.tar.gz && \
tar -xvf go1.19.linux-amd64.tar.gz && \
mv go /usr/local && \
rm go1.19.linux-amd64.tar.gz && \
apt-get clean
# Install gcc
RUN apt-get update \
&& apt-get install -y build-essential \
software-properties-common \
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
&& apt-get install -y gcc-9 \
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 \
&& update-alternatives --config gcc \
&& apt-get clean
ENV GOROOT /usr/local/go
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH
RUN UTBOT_GO_CLI_PATH="$(find /usr/src -type f -name 'utbot-cli*')" \
&& ln -s "${UTBOT_GO_CLI_PATH}" /usr/src/utbot-cli.jar