-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.go-toolset
37 lines (34 loc) · 1.84 KB
/
Dockerfile.go-toolset
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
#################################################################################
# Builder Image
FROM quay.io/cloudctl/ubi:builder as builder
#################################################################################
# Build Rootfs
ENV PATH="/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ADD ./repos/centos/etc /etc/
RUN set -ex \
&& dnf install -y git make gpgme-devel libassuan-devel gcc \
&& export goversion="$(curl -s https://golang.org/dl/?mode=json | awk -F'[":go]' '/ "version"/{print $8}' | head -n1)" \
&& curl -L https://golang.org/dl/go${goversion}.linux-amd64.tar.gz | tar -C /usr/local/ -xzvf - \
&& go version \
&& git clone https://github.com/containers/skopeo.git /tmp/skopeo \
&& echo
# && cd /skopeo \
# && make bin/skopeo \
#################################################################################
# Build Image from Rootfs
#FROM quay.io/cloudctl/ubi:micro
#ENV PATH="/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
#COPY --from=builder /usr/local/go /usr/local/go
CMD /bin/sh
#################################################################################
# Finalize Image
MAINTAINER ContainerCraft.io
LABEL \
license=GPLv3 \
name="tolang" \
distribution-scope="public" \
io.openshift.tags="golang" \
io.k8s.display-name="golang" \
summary="Golang Base Image | Red Hat UBI Image" \
description="Golang Base Image | Red Hat UBI Image" \
io.k8s.description="Golang Base Image | Red Hat UBI Image"