Skip to content

Commit

Permalink
Fix docker build error for go 1.20.5 version (#4877)
Browse files Browse the repository at this point in the history
  • Loading branch information
dttung2905 authored Aug 13, 2023
1 parent ee81112 commit b18ccd6
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

FROM golang:1.20.4
FROM golang:1.20.5

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -72,16 +72,20 @@ RUN apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME \
# Docker install
&& apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common lsb-release \
&& curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | apt-key add - 2>/dev/null \
&& add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" \
&& apt-get update \
# Docker install https://docs.docker.com/engine/install/debian/
&& sudo install -m 0755 -d /etc/apt/keyrings \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
&& sudo chmod a+r /etc/apt/keyrings/docker.gpg \
&& echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null \
&& sudo apt-get update \
&& apt-get install -y docker-ce-cli \
#
# Install pip & pre-commit
&& apt-get -y install python3-pip \
&& python3 -m pip install --no-cache-dir pre-commit \
&& python3 -m pip install --no-cache-dir --break-system-packages pre-commit \
#
# Clean up
&& apt-get autoremove -y \
Expand Down

0 comments on commit b18ccd6

Please sign in to comment.