Skip to content

Commit a438115

Browse files
committed
Merge branch 'release/1.0.0'
2 parents c6dc79f + 8a624a4 commit a438115

File tree

3 files changed

+22
-35
lines changed

3 files changed

+22
-35
lines changed

.github/workflows/create_image.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
tags:
66
- 'v*'
7-
workflow_dispatch:
87

98
jobs:
109
build:
@@ -23,6 +22,9 @@ jobs:
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:
@@ -34,6 +36,7 @@ jobs:
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

Dockerfile

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,23 @@
1-
FROM debian:bullseye-slim
1+
FROM alpine:latest
22
LABEL 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
2413
EXPOSE 8080
25-
ARG BUILD_TYPE=Release
2614

2715
COPY . /project
2816
WORKDIR /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

3819
COPY supervisor.conf /etc/supervisor.conf
3920
CMD ["supervisord", "-c", "/etc/supervisor.conf"]
21+
22+
WORKDIR /workspace
23+
VOLUME /workspace

supervisor.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ nodaemon=true
33

44
[program:Gsx2JsonppService]
55
directory = /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
1111
autostart = true
1212
autorestart = true
1313
stopasgroup = true

0 commit comments

Comments
 (0)