-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (35 loc) · 1.09 KB
/
Dockerfile
File metadata and controls
44 lines (35 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM registry.access.redhat.com/ubi9/go-toolset:1.25 AS builder
# Set as root to permission issues as its only for the builder
USER root
WORKDIR /go/src/github.com/k8snetworkplumbingwg/linuxptp-daemon
COPY go.mod go.sum ./
COPY vendor vendor
RUN --mount=type=cache,target=/go/pkg/mod go mod download
COPY addons addons
COPY cmd cmd
COPY deploy deploy
COPY hack hack
COPY Makefile Makefile
COPY pkg pkg
COPY .git .git
RUN --mount=type=cache,target=/root/.cache/go-build make
FROM quay.io/centos/centos:stream9
RUN yum -y update && yum -y update glibc && yum --setopt=skip_missing_names_on_install=False -y \
install \
pciutils \
linuxptp \
ethtool \
hwdata \
synce4l \
iproute \
procps-ng \
chrony \
gpsd-minimal \
gpsd-minimal-clients \
&& yum clean all
# Create symlinks for executables to match references
RUN ln -s /usr/bin/gpspipe /usr/local/bin/gpspipe
RUN ln -s /usr/sbin/gpsd /usr/local/sbin/gpsd
RUN ln -s /usr/bin/ubxtool /usr/local/bin/ubxtool
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/linuxptp-daemon/bin/ptp /usr/local/bin/
CMD ["/usr/local/bin/ptp"]