Skip to content

Commit

Permalink
chore(dockerfile): use registry.suse.com/bci/golang:1.22 base image
Browse files Browse the repository at this point in the history
- use registry.suse.com/bci/golang:1.22 base image
- update docker version

Signed-off-by: Derek Su <[email protected]>
  • Loading branch information
derekbit committed Jun 30, 2024
1 parent e98e31e commit 5e7ce04
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
@@ -1,24 +1,19 @@
FROM ubuntu:18.04
FROM registry.suse.com/bci/golang:1.22

ARG DAPPER_HOST_ARCH=amd64
ARG http_proxy
ARG https_proxy
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}

RUN apt-get update && \
apt-get install -y gcc ca-certificates git wget curl vim less file nfs-common && \
rm -f /bin/sh && ln -s /bin/bash /bin/sh
# RUN zypper -n addrepo --refresh https://download.opensuse.org/repositories/network:/utilities/SLE_15_SP5/network:utilities.repo && \
# zypper --gpg-auto-import-keys ref

ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \
DOCKER_URL_arm64=https://github.com/rancher/docker/releases/download/v1.10.3-ros1/docker-1.10.3_arm \
DOCKER_URL=DOCKER_URL_${ARCH}

RUN wget -O - ${!DOCKER_URL} > /usr/bin/docker && chmod +x /usr/bin/docker
RUN zypper -n install gcc ca-certificates git wget curl vim less file nfs-client awk docker && \
rm -rf /var/cache/zypp/*

ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm64=arm64 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.21.3.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2

ENV DAPPER_SOURCE /go/src/github.com/longhorn/backupstore
Expand Down

0 comments on commit 5e7ce04

Please sign in to comment.