Fork me on GitHub
#clojure-uk
<
2016-10-27
>
agile_geek06:10:13

Morning Folks

maleghast07:10:27

Morning 🙂

maleghast07:10:54

So, @agile_geek I put together a Dockerfile (see conversation yesterday) and I have fallen at the last hurdle… The container image builds, no problem, but when I run the image I get this: "docker: Error response from daemon: oci runtime error: exec: "/code": permission denied.” I fear that I am doing something obviously wrong...

maleghast07:10:27

Dockerfile:

FROM openjdk:8-alpine
MAINTAINER C. Oliver Godby <[email protected]>

RUN mkdir /code
RUN mkdir /code/toggler-configs

ADD ./config.json /code/toggler-configs
ADD ./target/toggler-1.1.4-standalone.jar /code

EXPOSE 7000

ENTRYPOINT ["/code"]
CMD ["java -jar toggler-1.1.4-standalone.jar /code/toggler-configs/”]

maleghast07:10:43

Any ideas..?

agile_geek07:10:36

This is what we are using in current client:

FROM openjdk:8-alpine

ADD target/xxxx.com.jar /opt/xxxx.com.jar
ADD run-server.sh run-server.sh
RUN chmod +x run-server.sh

CMD ["/bin/sh", "/run-server.sh"]

[in run-server.sh]

#!/bin/sh
java -Xmx2048m -Xms512m -jar /opt/xxxx.com.jar
super simple. I didn't do the Docker stuff and I'm no expert on it but this might give you a start?

maleghast07:10:45

brilliant - thanks!

agile_geek07:10:03

I suspect ENTRYPOINT needs to be a command - a bash script?

maleghast07:10:36

I think that you may be correct - that is what I am trying now based on your advice ^^

maleghast07:10:12

I’ll let you know in just one moment...

maleghast07:10:01

Well it runs, but I can’t hit the Port...

maleghast07:10:00

My bad - I am used to Docker Compose and forgot to manually bind the local port for it when I ran the container on its own.

maleghast07:10:19

Thanks so much @agile_geek - adding the shell script to run the .jar was all it took.

maleghast07:10:17

I really wish I could do more with Clojure, but it’s not something that I can teach everyone here to use - don’t have time, or willing coders. There is a very odd “I don’t want to learn new stuff” mentality out here in Manila...

maleghast07:10:00

However, I can sneak it onto the stack as a service that the team are just going to use, having forked it from my personal repo.

maleghast07:10:09

So that’s what I am doing 🙂

agile_geek07:10:24

I don't think it's a Manila thing...I see it in the UK just as much. It's definitely a large corporate thing but not exclusively. I see a lot of ppl who just want to do their 9 to 5 and that's it, but even in the Java or .NET communities their are ppl who are enthused about learning, just look at the size of the LJC.

agile_geek07:10:28

I think we are spoilt in the Clojure community as it almost self selects ppl who are interested in learning and moving forward... to the point that we have Clojurians moving on to Elm, etc.

jonpither08:10:52

Tired after EuroClojure

maleghast08:10:14

@agile_geek - You know what, you may be right. I think it’s exaggerated here; if you have 4-6 years of any tech under your belt here then you can reasonably expect to move up the ladder, get into a “good job” and learning new things, being disruptive is not what people want, they want you on your game with your 6 years of PHP or whatever...

maleghast08:10:24

@jonpither I bet you are - was it good?

jonpither08:10:32

Yeah. The conf was fun, people great as ever

maleghast08:10:44

Excellent - I am only slightly jealous 😉

maleghast08:10:12

Any stand-out talks, totally new ideas that knocked you over?

jonpither09:10:45

Lots of spec, have to start using it :-)

maleghast09:10:23

@jonpither I am going to TRY to look at Spec… I feel as though it will be a game changer like core.async was, except more so, but I am going to have to struggle to find the time.

maleghast09:10:01

If I don’t put it at the top of all my lists I won’t get to it… Python is taking over my professional life (could be a LOT worse), and I am still trying to find time for my side-project, to get it beyond architecture and write some code...

maleghast09:10:37

So maybe clojure.spec is the way to do that - they always say it’s good to have a project on which to use the thing you want to learn… 😉

tcoupland09:10:40

on the spec front, i discovered an interesting factoid in some of our stuff. spec/tuple is ~5 times quicker than spec/cat. So, i'd say, only use cat if you really really want the destructing, if your just doing some validation, then tuple is your man!

maleghast09:10:30

*stores away useful nugget*

kevin4213:10:10

Morning, I’m back after almost 3 weeks of paternity leave, do you know if the XT16 videos are online yet? Thanks 🙂

jonpither15:10:58

hi @kevin42 we are working on them

jonpither15:10:02

hope to get an ETA soon

kevin4215:10:13

cool and thank you. I was wandering if I had missed them.