Skip to content

Commit bc51ab6

Browse files
committed
bump: docker image to support m1 apple; Created Dockerfile
1 parent 2b9847c commit bc51ab6

5 files changed

Lines changed: 11 additions & 20 deletions

File tree

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ workflows:
176176
install_sbt_version: 1.6.1
177177
cmd: |
178178
sbt "set codacyAnalysisCli / version := \"dev-snapshot\";
179-
codacyAnalysisCli/docker:publishLocal"
179+
codacyAnalysisCli/stage"
180+
docker build -t $CIRCLE_PROJECT_REPONAME:dev-snapshot .
180181
docker save --output docker-image.tar $CIRCLE_PROJECT_REPONAME:dev-snapshot
181182
cache_prefix: *cache_prefix
182183
persist_to_workspace: true

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM alpine:3.15.4
2+
RUN apk add --no-cache --update bash docker openjdk8
3+
WORKDIR /workdir
4+
COPY --chown=root:root cli/target/universal/stage /workdir
5+
USER root
6+
ENTRYPOINT ["/workdir/bin/codacy-analysis-cli"]
7+
CMD []

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,9 @@ sbt codacyCoverage
318318

319319
* **Local**
320320

321-
sbt 'set version in codacyAnalysisCli := "<VERSION>"' codacyAnalysisCli/docker:publishLocal
321+
sbt 'codacyAnalysisCli/stage'
322+
docker build -t codacy-analysis-cli .
322323

323-
* **Release**
324-
325-
sbt 'set version in codacyAnalysisCli := "<VERSION>"' codacyAnalysisCli/docker:publish
326324

327325
### Library
328326

build.sbt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ lazy val codacyAnalysisCli = project
6565
.settings(
6666
name := "codacy-analysis-cli",
6767
coverageExcludedPackages := "<empty>;com\\.codacy\\..*CLIError.*",
68-
Common.dockerSettings,
6968
Common.genericSettings,
7069
Universal / javaOptions ++= Seq("-XX:MinRAMPercentage=60.0", "-XX:MaxRAMPercentage=90.0"),
7170
publish := (Docker / publish).value,

project/Common.scala

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,6 @@ object Common {
3030
scalacOptions -= "-Xfatal-warnings",
3131
Compile / doc / sources := Seq.empty)
3232

33-
val dockerSettings: Seq[Def.Setting[_]] = Seq(
34-
Docker / packageName := packageName.value,
35-
Docker / version := version.value,
36-
dockerBaseImage := "openjdk:8-jre-alpine",
37-
Docker / defaultLinuxInstallLocation := defaultDockerInstallationPath,
38-
Docker / daemonUser := "root",
39-
dockerEntrypoint := Seq(s"$defaultDockerInstallationPath/bin/${name.value}"),
40-
dockerCmd := Seq(),
41-
dockerCommands := dockerCommands.value.flatMap {
42-
case cmd @ Cmd("WORKDIR", _) =>
43-
Seq(Cmd("RUN", "apk add --no-cache --update bash docker"), cmd)
44-
case other => List(other)
45-
})
46-
4733
val compilerFlagsDefault: Seq[String] = Seq(
4834
"-deprecation", // Emit warning and location for usages of deprecated APIs.
4935
"-encoding",

0 commit comments

Comments
 (0)