1
- FROM golang:1.16.0
1
+ FROM golang:1.16.0-alpine
2
2
3
3
WORKDIR /go/src/github.com/neel1996/gitconvex-server
4
4
5
5
COPY . .
6
6
7
- # Install required packages from apt-get
8
- RUN apt-get update && \
9
- apt-get install apt-transport-https ca-certificates gnupg software-properties-common wget sudo -y && \
10
- apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' && \
11
- wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null && \
12
- apt-get install cmake -y
13
-
14
- # Install node js
15
- RUN curl -fsSL https://deb.nodesource.com/setup_15.x | sudo -E bash - && \
16
- apt-get install nodejs -y
7
+ # Install required packages
8
+ RUN apk update && \
9
+ apk add --update libgit2-dev libssh2-dev gcc make nodejs npm musl-dev
17
10
18
11
# Building React UI bundle
19
12
RUN cd ui/ && \
20
13
npm install && \
21
14
export NODE_ENV=production && \
15
+ npm i -g npm@6 && \
22
16
npm install tailwindcss postcss autoprefixer && \
23
17
npx tailwindcss build -o src/index.css -c src/tailwind.config.js && \
24
18
npm run build && \
@@ -27,35 +21,8 @@ RUN cd ui/ && \
27
21
cd .. && \
28
22
rm -rf ui/
29
23
30
- # Download and build OpenSSL
31
- RUN cd ~ && git clone https://github.com/openssl/openssl.git && \
32
- cd openssl && ./Configure && \
33
- make && make install && \
34
- cp -rp *.so* /usr/lib/
35
-
36
- # Download libssh2
37
- RUN cd ~ && wget https://github.com/libssh2/libssh2/releases/download/libssh2-1.9.0/libssh2-1.9.0.tar.gz && \
38
- tar -xzf libssh2-1.9.0.tar.gz && \
39
- cd libssh2-1.9.0/ && \
40
- mkdir build && cd build && \
41
- cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_INSTALL_PREFIX=../install .. && cmake --build . --target install
42
-
43
- # Download and Libgit2 setup
44
- RUN cd ~ && wget https://github.com/libgit2/libgit2/releases/download/v1.1.0/libgit2-1.1.0.tar.gz && \
45
- tar -xzf libgit2-1.1.0.tar.gz && \
46
- cd libgit2-1.1.0/ && \
47
- mkdir build && cd build && \
48
- cmake -DCMAKE_PREFIX_PATH=../../libssh2-1.9.0/install/ -DCMAKE_INSTALL_PREFIX=../install -DBUILD_CLAR=OFF .. && \
49
- cmake --build . --target install && \
50
- make install && \
51
- cp -rp ~/libgit2-1.1.0/install/include/* /usr/include/ && \
52
- cp -rp ~/libgit2-1.1.0/install/lib/pkgconfig/* /usr/lib/pkgconfig && \
53
- cp -rp ~/libgit2-1.1.0/install/lib/lib* /usr/lib/
54
-
55
- # Post Cleanup stage
56
- RUN apt-get remove cmake nodejs apt-transport-https ca-certificates gnupg software-properties-common wget -y
24
+ RUN go get -v
57
25
58
26
EXPOSE 9001
59
27
60
- CMD export PKG_CONFIG_PATH=/usr/local/lib && \
61
- go run /go/src/github.com/neel1996/gitconvex-server/server.go
28
+ CMD go run /go/src/github.com/neel1996/gitconvex-server/server.go
0 commit comments