Skip to content

Commit

Permalink
fix: dockerfile
Browse files Browse the repository at this point in the history
add systemd service unit
closes #11
  • Loading branch information
acavella committed Jan 6, 2024
1 parent 2dfc01b commit 1e4f42b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM docker.io/library/golang:1.20.12-alpine3.19 as builder

ENV GOREVOKE_TAG=v1.0.0-rc.5
ENV GOREVOKE_TAG=v1.0.0-rc.6
WORKDIR /go/src/

RUN apk add --no-cache -U git \
Expand All @@ -12,8 +12,10 @@ FROM registry.access.redhat.com/ubi9/ubi:9.3-1476 as runner
LABEL maintainer="Tony Cavella <[email protected]>"

COPY --from=builder /usr/local/bin/gorevoke/ /usr/local/bin/gorevoke/
COPY ./gorevoke.service /etc/systemd/system/

RUN dnf update -y
RUN dnf update -y \
&& systemctl enable gorevoke.service

EXPOSE 4000
CMD [ "/usr/local/bin/gorevoke/gorevoke" ]
CMD [ "/sbin/init" ]
8 changes: 8 additions & 0 deletions build/docker/gorevoke.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=GoRevoke systemd service unit file.

[Service]
ExecStart=/usr/local/bin/gorevoke/gorevoke

[Install]
WantedBy=multi-user.target

0 comments on commit 1e4f42b

Please sign in to comment.