Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker packager ignores commands #1269

Closed
MaksSieve opened this issue Oct 16, 2019 · 1 comment
Closed

docker packager ignores commands #1269

MaksSieve opened this issue Oct 16, 2019 · 1 comment
Labels

Comments

@MaksSieve
Copy link

MaksSieve commented Oct 16, 2019

I want to set some options in build.sbt, but packager literraly ignores all my tryings.

build.sbt

import Dependencies._

enablePlugins(JavaAppPackaging, DockerPlugin)

dockerExposedPorts ++= Seq(9000)

scalaVersion := "2.13.1"

name := "my-app"
version := "0.3.0"
scalacOptions += "-Ypartial-unification"

libraryDependencies ++= commonDependencies ++ doobie ++ circe ++ http4s ++ Tsec ++ circeDerivation

addCompilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.0")
addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.11.0" cross CrossVersion.full)

mainClass in Compile := Some("com.me.myapp.Main")

scalacOptions := Seq(
  "-unchecked",
  "-feature",
  "-language:existentials",
  "-language:higherKinds",
  "-language:implicitConversions",
  "-language:postfixOps",
  "-deprecation",
  "-Ymacro-annotations",
  "-encoding",
  "utf8"
)

lazy val commonDependencies = Seq(
  logback,
  scalaLogging,
  slf4j,
  typesafeConfig,
  pureConfig,
  cats,
  catsEffect,
  circeConfig,
  postgresJdbcDriver,
  slf4jL,
  scalatest % "test",
  scalacheck % "test",
)

Expected behaviour

in this exapmle - adds EXPOSE section to Dockerfile

Actual behaviour

Nothing changes in common Dockerfile

FROM openjdk:8 as stage0
WORKDIR /opt/docker
COPY opt /opt
USER root
RUN ["chmod", "-R", "u=rX,g=rX", "/opt/docker"]
RUN ["chmod", "u+x,g+x", "/opt/docker/bin/performance-test-analyzer"]

FROM openjdk:8
LABEL MAINTAINER="me@somethingmail.com"
USER root
RUN id -u demiourgos728 2> /dev/null || useradd --system --create-home --uid 1001 --gid 0 demiourgos728
WORKDIR /opt/docker
COPY --from=stage0 --chown=demiourgos728:root /opt/docker /opt/docker
USER 1001
ENTRYPOINT ["/opt/docker/bin/performance-test-analyzer"]
CMD []

Information

  • What sbt-native-packager are you using: 1.4.1
  • What sbt version: 1.3.2
  • What is your build system: Windows
  • What package are you building: docker
  • What version has your build tool: 19.03.2
  • What is your target system: Debian
@muuki88
Copy link
Contributor

muuki88 commented Oct 24, 2019

Thanks @MaksSieve for your report. What was the solution 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants