-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tweak docker ci builds to use alpine and not include firecore
- Loading branch information
1 parent
8fb2418
commit 2f30f00
Showing
4 changed files
with
24 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,31 @@ | ||
FROM ubuntu:20.04 | ||
FROM golang:1.21-alpine as build | ||
WORKDIR /app | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ | ||
apt-get -y install -y \ | ||
ca-certificates libssl1.1 vim htop iotop sysstat \ | ||
dstat strace lsof curl jq tzdata && \ | ||
rm -rf /var/cache/apt /var/lib/apt/lists/* | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
||
RUN rm /etc/localtime && ln -snf /usr/share/zoneinfo/America/Montreal /etc/localtime && dpkg-reconfigure -f noninteractive tzdata | ||
COPY . ./ | ||
|
||
ADD /fireeth /app/fireeth | ||
RUN go build ./cmd/fireeth | ||
|
||
#### | ||
|
||
FROM alpine:edge | ||
|
||
ENV PATH "$PATH:/app" | ||
|
||
COPY tools/fireeth/motd_generic /etc/motd | ||
COPY tools/fireeth/99-fireeth.sh /etc/profile.d/ | ||
|
||
# On SSH connection, /root/.bashrc is invoked which invokes '/root/.bash_aliases' if existing, | ||
# so we hijack the file to "execute" our specialized bash script | ||
RUN echo ". /etc/profile.d/99-fireeth.sh" > /root/.bash_aliases | ||
|
||
ENV PATH "$PATH:/app" | ||
RUN apk --no-cache add \ | ||
ca-certificates htop iotop sysstat \ | ||
strace lsof curl jq tzdata | ||
|
||
ENTRYPOINT ["/app/fireeth"] | ||
RUN mkdir -p /app/ && curl -Lo /app/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.4.12/grpc_health_probe-linux-amd64 && chmod +x /app/grpc_health_probe | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=build /app/fireeth /app/fireeth | ||
|
||
ENTRYPOINT ["/app/fireeth"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters