Skip to content

Commit

Permalink
Merge pull request #56 from codecrafters-io/CC-1064
Browse files Browse the repository at this point in the history
build: update dockerfiles to fix hadolint issues.
  • Loading branch information
ryan-gang authored Mar 13, 2024
2 parents e010e58 + e4acf4a commit 198fe05
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
6 changes: 4 additions & 2 deletions dockerfiles/cpp-20.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM gcc:12.2.0-bullseye

RUN apt-get update
RUN apt-get install -y cmake
RUN apt-get update && \
apt-get install --no-install-recommends -y cmake=3.18.* && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
3 changes: 1 addition & 2 deletions dockerfiles/go-1.19.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,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"
3 changes: 1 addition & 2 deletions dockerfiles/python-3.10.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.10-alpine

RUN pip install pipenv
RUN pip install --no-cache-dir "pipenv>=2023.12.1"

COPY Pipfile /app/Pipfile
COPY Pipfile.lock /app/Pipfile.lock
Expand All @@ -15,4 +15,3 @@ RUN pipenv install
RUN pipenv run python3 -c "1+1"

ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Pipfile,Pipfile.lock"

4 changes: 2 additions & 2 deletions 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 pip install pipenv
RUN pip install --no-cache-dir "pipenv>=2023.12.1"

COPY Pipfile /app/Pipfile
COPY Pipfile.lock /app/Pipfile.lock
Expand All @@ -14,4 +14,4 @@ RUN pipenv install
# Force environment creation
RUN pipenv run python3 -c "1+1"

ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Pipfile,Pipfile.lock"
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="Pipfile,Pipfile.lock"
4 changes: 2 additions & 2 deletions dockerfiles/ruby-2.7.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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'

WORKDIR /app
4 changes: 2 additions & 2 deletions dockerfiles/ruby-3.2.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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'

WORKDIR /app

0 comments on commit 198fe05

Please sign in to comment.