-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (31 loc) · 1.12 KB
/
Dockerfile
File metadata and controls
44 lines (31 loc) · 1.12 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
FROM ubuntu:22.04 as builder
LABEL maintainer="Vickey Kumar <kumarvickey45@yahoo.com>"
RUN mkdir -p /opt/gotty && mkdir -p /opt/openrepl
WORKDIR /opt/openrepl
#ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
# place timezone in /etc/timezone
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY ./install_prerequisite.sh /opt/openrepl/
COPY ./bin/gdb /usr/bin/
RUN ./install_prerequisite.sh --cleanup-tools --run-tests
FROM builder as build-image
#install the requisites to build the APP
RUN apt-get install -y --no-install-recommends make gcc git npm && npm install -g npm@8.5.1
COPY . /opt/openrepl/
WORKDIR /opt/openrepl/src
RUN make all
FROM builder
#install the app
RUN mkdir -p /gottyTraces && mkdir -p /opt/gotty && \
mkdir -p /opt/scripts
COPY --from=build-image /opt/openrepl/bin/gotty /usr/local/bin/
COPY --from=build-image /opt/openrepl/scripts/run_app.sh /opt/scripts/
RUN chmod 755 /usr/local/bin/gotty && chmod 755 /opt/scripts/run_app.sh
WORKDIR /opt/openrepl
ENV TERM=xterm
ENV GODEBUG=cgocheck=1
ENV GOPATH=/opt/gotty/
EXPOSE 80
ENTRYPOINT ["/opt/scripts/run_app.sh"]
CMD ["-p", "80"]