File tree 4 files changed +40
-1
lines changed
4 files changed +40
-1
lines changed Original file line number Diff line number Diff line change
1
+ FROM alpine as build
2
+
3
+ RUN apk add --no-cache gcc g++ musl-dev linux-headers cmake openssl-dev
4
+ RUN apk add --no-cache make
5
+ RUN apk add --no-cache zlib-dev
6
+
7
+ RUN addgroup -S app && adduser -S -G app app
8
+ RUN chown -R app:app /opt
9
+ RUN chown -R app:app /usr/local
10
+
11
+ # There is a bug in CMake where we cannot build from the root top folder
12
+ # So we build from /opt
13
+ COPY --chown=app:app . /opt
14
+ WORKDIR /opt
15
+
16
+ USER app
17
+ RUN [ "make" , "ws_install" ]
18
+
19
+ FROM alpine as runtime
20
+
21
+ RUN apk add --no-cache libstdc++
22
+
23
+ RUN addgroup -S app && adduser -S -G app app
24
+ COPY --chown=app:app --from=build /usr/local/bin/ws /usr/local/bin/ws
25
+ RUN chmod +x /usr/local/bin/ws
26
+ RUN ldd /usr/local/bin/ws
27
+
28
+ # Now run in usermode
29
+ USER app
30
+ WORKDIR /home/app
31
+
32
+ ENTRYPOINT ["ws" ]
33
+ EXPOSE 8008
34
+ CMD ["--help" ]
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ COPY --chown=app:app . /opt
14
14
WORKDIR /opt
15
15
16
16
USER app
17
- RUN [ "make" ]
17
+ RUN [ "make", "ws_install" ]
18
18
19
19
FROM alpine as runtime
20
20
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ add_library(ixsentry STATIC
18
18
19
19
set (IXSENTRY_INCLUDE_DIRS
20
20
.
21
+ ..
21
22
../third_party
22
23
../third_party/spdlog/include )
23
24
Original file line number Diff line number Diff line change 14
14
ws :
15
15
mkdir -p build && (cd build ; cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 .. ; make -j 4)
16
16
17
+ ws_install :
18
+ mkdir -p build && (cd build ; cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 .. ; make -j 4 install)
19
+
17
20
ws_openssl :
18
21
mkdir -p build && (cd build ; cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_TLS=1 -DUSE_WS=1 -DUSE_OPEN_SSL=1 .. ; make -j 4)
19
22
@@ -47,6 +50,7 @@ docker_test:
47
50
docker build -f docker/Dockerfile.debian -t bsergean/ixwebsocket_test:build .
48
51
49
52
docker :
53
+ git clean -dfx
50
54
docker build -t ${IMG} .
51
55
docker tag ${IMG} ${BUILD}
52
56
You can’t perform that action at this time.
0 commit comments