Skip to content

Commit

Permalink
Dockerfile: use registry.suse.com/bci/golang:1.22 image
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Su <derek.su@suse.com>
  • Loading branch information
derekbit committed Jun 25, 2024
1 parent 7dae9be commit e867fbc
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions package/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.suse.com/bci/bci-base:15.6 AS builder
FROM registry.suse.com/bci/golang:1.22 AS builder

ARG ARCH=amd64

Expand All @@ -7,18 +7,18 @@ RUN zypper -n ref && \

RUN zypper -n addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/SLE_15/system:snappy.repo && \
zypper -n addrepo --refresh https://download.opensuse.org/repositories/network:/utilities/SLE_15/network:utilities.repo && \
zypper -n addrepo --refresh https://download.opensuse.org/repositories/devel:libraries:c_c++/15.5/devel:libraries:c_c++.repo && \
zypper -n addrepo --refresh https://download.opensuse.org/repositories/devel:languages:python:Factory/15.5/devel:languages:python:Factory.repo && \
zypper -n addrepo --refresh https://download.opensuse.org/repositories/devel:libraries:c_c++/15.6/devel:libraries:c_c++.repo && \
zypper -n addrepo --refresh https://download.opensuse.org/repositories/devel:languages:python:Factory/15.6/devel:languages:python:Factory.repo && \
zypper -n addrepo --refresh https://download.opensuse.org/repositories/devel:languages:python:backports/SLE_15/devel:languages:python:backports.repo && \
zypper --gpg-auto-import-keys ref

RUN zypper -n install cmake curl wget git gcc tar gzip xsltproc docbook-xsl-stylesheets python3 meson ninja python3-pip
RUN zypper update -y && \

Check warning on line 15 in package/Dockerfile

View check run for this annotation

codefactor.io / CodeFactor

package/Dockerfile#L15

`zypper clean` missing after zypper use. (DL3036)

Check warning on line 15 in package/Dockerfile

View check run for this annotation

codefactor.io / CodeFactor

package/Dockerfile#L15

Specify version with `zypper install -y <package>=<version>`. (DL3037)
zypper -n install cmake wget libxslt-tools docbook-xsl-stylesheets python3 meson ninja python3-pip

# Build go-spdk-helper
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm64=arm64 GOLANG_ARCH_s390x=s390x GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
RUN wget -O - https://storage.googleapis.com/golang/go1.22.2.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \
go install golang.org/x/lint/golint@latest
RUN go install golang.org/x/lint/golint@latest

ENV GO_SPDK_HELPER_DIR /usr/src/go-spdk-helper
ENV GO_SPDK_HELPER_COMMIT_ID d05637da59788eeeb8927c663f0eec7c958d3f97
Expand Down Expand Up @@ -105,7 +105,8 @@ RUN zypper -n addrepo --refresh https://download.opensuse.org/repositories/syste
zypper -n addrepo --refresh https://download.opensuse.org/repositories/devel:languages:python:backports/SLE_15/devel:languages:python:backports.repo && \
zypper --gpg-auto-import-keys ref

RUN zypper -n install nfs-client nfs4-acl-tools cifs-utils sg3_utils \
RUN zypper update -y && \

Check warning on line 108 in package/Dockerfile

View check run for this annotation

codefactor.io / CodeFactor

package/Dockerfile#L108

`zypper clean` missing after zypper use. (DL3036)

Check warning on line 108 in package/Dockerfile

View check run for this annotation

codefactor.io / CodeFactor

package/Dockerfile#L108

Specify version with `zypper install -y <package>=<version>`. (DL3037)
zypper -n install nfs-client nfs4-acl-tools cifs-utils sg3_utils \
iproute2 qemu-tools e2fsprogs xfsprogs util-linux-systemd python3-pyelftools libcmocka-devel device-mapper netcat kmod jq util-linux procps && \
rm -rf /var/cache/zypp/*

Expand Down

0 comments on commit e867fbc

Please sign in to comment.