Skip to content

Commit

Permalink
Update Dockerfile for GitHub Container Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
matsuo committed Aug 18, 2024
1 parent ae2ee4c commit 5a6d66b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
FROM --platform=linux/x86_64 golang:1.22
#FROM --platform=linux/x86_64 ubuntu:22.04
FROM --platform=linux/x86_64 ubuntu:22.04

Check warning on line 1 in Dockerfile

View workflow job for this annotation

GitHub Actions / Publish Image

FROM --platform flag should not use a constant value

FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/x86_64" More info: https://docs.docker.com/go/dockerfile/rule/from-platform-flag-const-disallowed/

RUN apt update && apt install -y curl tar make bash git build-essential

# Install Go
#WORKDIR /root
WORKDIR /root

#RUN curl -LO https://go.dev/dl/go1.22.6.linux-amd64.tar.gz && tar -C /tmp -xzf go1.22.6.linux-amd64.tar.gz && rm -f /root/go1.22.6.linux-amd64.tar.gz && mv /tmp/go go1.22
RUN curl -LO https://go.dev/dl/go1.22.6.linux-amd64.tar.gz && tar -C /tmp -xzf go1.22.6.linux-amd64.tar.gz && rm -f /root/go1.22.6.linux-amd64.tar.gz && mv /tmp/go go1.22

#WORKDIR /root/go/src/go.googlesource.com/go
WORKDIR /root/go/src/go.googlesource.com/go

#RUN git clone https://go.googlesource.com/go goroot && cd goroot && git checkout release-branch.go1.23 && cd src && export GOROOT_BOOTSTRAP=/root/go1.22 && ./all.bash
RUN git clone https://go.googlesource.com/go goroot && cd goroot && git checkout release-branch.go1.23 && cd src && export GOROOT_BOOTSTRAP=/root/go1.22 && ./all.bash

#RUN cp -pr /root/go1.22 /usr/local/go
RUN cp -pr /root/go1.22 /usr/local/go

# Install Goss
WORKDIR /root/go/src/github.com/goss-org
Expand Down

0 comments on commit 5a6d66b

Please sign in to comment.