File tree Expand file tree Collapse file tree 3 files changed +22
-35
lines changed
Expand file tree Collapse file tree 3 files changed +22
-35
lines changed Original file line number Diff line number Diff line change 44 push :
55 tags :
66 - ' v*'
7- workflow_dispatch :
87
98jobs :
109 build :
2322 with :
2423 username : ${{ secrets.DOCKERHUB_USERNAME }}
2524 password : ${{ secrets.DOCKERHUB_TOKEN }}
25+ - name : Get the version
26+ id : get_version
27+ run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/}
2628 - name : Build and push
2729 uses : docker/build-push-action@v2
2830 with :
3436 push : true
3537 tags : |
3638 deflinhec/gsx2jsonpp:latest
39+ deflinhec/gsx2jsonpp:${{ steps.get_version.outputs.VERSION }}
3740 - name : Inspect image
3841 run : |
3942 docker buildx imagetools inspect deflinhec/gsx2jsonpp:latest
Original file line number Diff line number Diff line change 1- FROM debian:bullseye-slim
1+ FROM alpine:latest
22LABEL maintainer "deflinhec <deflinhec@gmail.com>"
33
4- ENV DEBIAN_FRONTEND noninteractive
5- RUN apt-get update && apt-get install -y --no-install-recommends \
6- gcc \
7- g++ \
8- git \
9- make \
10- cmake \
11- libssl-dev \
12- zlib1g-dev \
13- apt-utils \
14- apt-transport-https \
15- ca-certificates \
16- supervisor
4+ RUN apk --no-cache add bash \
5+ git linux-headers \
6+ cmake make gcc g++ \
7+ libc-dev \
8+ libressl-dev \
9+ zlib-dev \
10+ supervisor
1711
18- RUN rm -rf /var/lib/apt/lists/* \
19- && mkdir -p /var/log/supervisor \
20- && mkdir -p /etc/supervisor/conf.d
21-
22- ENV CC=gcc
23- ENV CXX=g++
12+ ENV CC=gcc CXX=g++ TZ=Asia/Taipei
2413EXPOSE 8080
25- ARG BUILD_TYPE=Release
2614
2715COPY . /project
2816WORKDIR /project
29- RUN /bin/bash scripts/build.sh $BUILD_TYPE
30-
31- ENV TZ=Asia/Taipei
32- RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime
33- RUN echo $TZ > /etc/timezone
34-
35- WORKDIR /workspace
36- VOLUME /workspace
17+ RUN /bin/bash scripts/build.sh Release
3718
3819COPY supervisor.conf /etc/supervisor.conf
3920CMD ["supervisord" , "-c" , "/etc/supervisor.conf" ]
21+
22+ WORKDIR /workspace
23+ VOLUME /workspace
Original file line number Diff line number Diff line change @@ -3,11 +3,11 @@ nodaemon=true
33
44[program:Gsx2JsonppService]
55directory = /workspace
6- command= /project/bin/Gsx2Jsonpp --host 0.0.0.0
7- stdout_logfile= /workspace/info.log
8- stdout_logfile_maxbytes= 0
9- stderr_logfile= /workspace/error.log
10- stderr_logfile_maxbytes= 0
6+ command = /project/bin/Gsx2Jsonpp --host 0.0.0.0
7+ stdout_logfile = /workspace/info.log
8+ stdout_logfile_maxbytes = 0
9+ stderr_logfile = /workspace/error.log
10+ stderr_logfile_maxbytes = 0
1111autostart = true
1212autorestart = true
1313stopasgroup = true
You can’t perform that action at this time.
0 commit comments