Skip to content

Commit

Permalink
build: update dockerfiles to fix hadolint errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-gang committed Mar 12, 2024
1 parent 70d7e13 commit 5520f7f
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 18 deletions.
4 changes: 2 additions & 2 deletions dockerfiles/c-9.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM n0madic/alpine-gcc:9.2.0

RUN apk add --update-cache --upgrade curl
RUN apk add --no-cache 'curl>=7.66'

# For making HTTP requests using libcurl
RUN apk add --update-cache --upgrade curl-dev
RUN apk add --no-cache --upgrade 'curl-dev>=7.66'

# Download docker-explorer
ARG docker_explorer_version=v18
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/go-1.13.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.13-alpine

RUN apk add curl
RUN apk add --no-cache --upgrade 'curl>=7.66'

# Download docker-explorer
ARG docker_explorer_version=v18
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/go-1.16.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.16-alpine

RUN apk add curl
RUN apk add --no-cache --upgrade 'curl>=7.66'

# Download docker-explorer
ARG docker_explorer_version=v18
Expand Down
5 changes: 2 additions & 3 deletions dockerfiles/go-1.19.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.19-alpine

RUN apk add curl
RUN apk add --no-cache 'curl>=7.66'

# Download docker-explorer
ARG docker_explorer_version=v18
Expand All @@ -13,5 +13,4 @@ WORKDIR /app

COPY go.mod go.sum ./

RUN go mod graph | awk '{if ($1 !~ "@") print $2}' | xargs -r go get

RUN ash -c "set -exo pipefail; go mod graph | awk '{if (\$1 !~ \"@\") {print \$2}}' | xargs -r go get"
2 changes: 1 addition & 1 deletion dockerfiles/nim-1.0.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM nimlang/nim:1.0.6-alpine

RUN apk add curl
RUN apk add --no-cache 'curl>=7.66'

# Download docker-explorer
ARG docker_explorer_version=v18
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/php-7.4.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM php:7.4-cli-alpine

RUN apk add --update-cache --upgrade curl
RUN apk add --update-cache --upgrade curl-dev
RUN apk add --no-cache --upgrade 'curl>=7.66'
RUN apk add --no-cache --upgrade 'curl-dev>=7.66'

RUN docker-php-ext-install pcntl

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/python-3.11.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.11-alpine

RUN apk add curl
RUN apk add --no-cache 'curl>=7.66'

# Download docker-explorer.
ARG docker_explorer_version=v18
Expand Down
6 changes: 3 additions & 3 deletions dockerfiles/ruby-2.7.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ruby:2.7-alpine

RUN apk add --update-cache --upgrade curl
RUN apk add --update-cache --upgrade curl-dev
RUN apk add --no-cache --upgrade 'curl>=7.66'
RUN apk add --no-cache --upgrade 'curl-dev>=7.66'

# Download docker-explorer
ARG docker_explorer_version=v18
RUN curl --fail -Lo /usr/local/bin/docker-explorer https://github.com/codecrafters-io/docker-explorer/releases/download/${docker_explorer_version}/${docker_explorer_version}_linux_amd64
RUN chmod +x /usr/local/bin/docker-explorer
RUN chmod +x /usr/local/bin/docker-explorer
6 changes: 3 additions & 3 deletions dockerfiles/ruby-3.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ruby:3.2-alpine

RUN apk add --update-cache --upgrade curl
RUN apk add --update-cache --upgrade curl-dev
RUN apk add --no-cache --upgrade 'curl>=7.66'
RUN apk add --no-cache --upgrade 'curl-dev>=7.66'

# Download docker-explorer
ARG docker_explorer_version=v18
RUN curl --fail -Lo /usr/local/bin/docker-explorer https://github.com/codecrafters-io/docker-explorer/releases/download/${docker_explorer_version}/${docker_explorer_version}_linux_amd64
RUN chmod +x /usr/local/bin/docker-explorer
RUN chmod +x /usr/local/bin/docker-explorer
5 changes: 4 additions & 1 deletion dockerfiles/swift-5.6.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM swift:5.6.1-focal

RUN apt-get update && apt-get install -y curl
RUN apt-get update && \
apt-get install --no-install-recommends -y curl=7.68.* && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Download docker-explorer
ARG docker_explorer_version=v18
Expand Down

0 comments on commit 5520f7f

Please sign in to comment.