File tree 5 files changed +45
-3
lines changed
5 files changed +45
-3
lines changed Original file line number Diff line number Diff line change 1
- FROM golang:1.18-stretch
1
+ FROM golang:1.18-alpine
2
2
RUN go install github.com/cespare/reflex@latest
3
3
COPY reflex.conf /
4
4
ENTRYPOINT ["reflex" , "-c" , "/reflex.conf" ]
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ name : Build docker image
2
+
3
+ on :
4
+ create :
5
+ tags :
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : login to GitHub Container Registry
12
+ uses : docker/login-action@v2
13
+ with :
14
+ username : svenlie
15
+ password : ${{ secrets.DOCKER_TOKEN }}
16
+ - uses : actions/checkout@v3
17
+ - name : Build the imap2jira docker image
18
+ run : docker build . --file ./Dockerfile --tag svenlie/imap2jira:${GITHUB_REF##*/} --tag gsvenlie/imap2jira:latest
19
+ - name : Push imap2jira docker images
20
+ run : docker push svenlie/imap2jira --all-tags
Original file line number Diff line number Diff line change
1
+ # build stage
2
+ FROM golang:1.18-alpine
3
+ RUN mkdir -p /go/src/app
4
+
5
+ COPY service/go.* /go/src/app/
6
+ WORKDIR /go/src/app
7
+ RUN go mod download
8
+
9
+ WORKDIR /go/src/app
10
+ ADD service/cmd cmd
11
+ WORKDIR /go/src/app/cmd/server
12
+ RUN go build -o app-server
13
+
14
+ # final stage
15
+ FROM alpine:latest
16
+ WORKDIR /app
17
+ RUN apk --no-cache update
18
+ RUN apk --no-cache upgrade
19
+ RUN apk add --no-cache tzdata
20
+ RUN cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime
21
+ RUN echo "Europe/Berlin" > /etc/timezone
22
+ COPY --from="build-env" /go/src/app/cmd/server/app-server /app/
23
+ ENTRYPOINT ./app-server
Original file line number Diff line number Diff line change @@ -3,11 +3,10 @@ version: "3.7"
3
3
services :
4
4
imap2jira :
5
5
build :
6
- context : " docker "
6
+ context : " . "
7
7
dockerfile : Dockerfile
8
8
container_name : imap2jira
9
9
restart : always
10
- working_dir : /go/src/app
11
10
env_file :
12
11
- .env
13
12
volumes :
You can’t perform that action at this time.
0 commit comments