 have one Dockerfile for both to keep "Dockerfile implementation in one place" like inheritance:
FROM golang AS gobase
ENV APP_ENV "pro"
COPY./app /go/src/github.com/user/myProject/app
WORKDIR /go/src/github.com/user/myProject/app

RUN go get./
RUN go build
EXPOSE 8080

FROM gobase AS godev

ENV APP_ENV "dev"

RUN go get github.com/pilu/fresh
RUN go-wrapper download
RUN go-wrapper install

CMD [ "fresh" ]

And then use docker-compose.dev.yml & docker-compose.pro.yml
Like for docker-compose.dev.yml:
version: '2'

services:
  godev:
    environment:
      - APP_ENV="dev"
    image: godev

So first of all, the naming is not working.
Bonus question: how to you build an image for production - do you just compile in one container(docker run) and then copy the binary to a new container?

A:

Don't use dev as a name, but as a tag:
go:dev
go:prod

and your compose.yml:
services:
  go:
    image: go:dev

Bonus: Have a look at this answer under "Edit 29/06/17" and use this build step for both (dev and prod)

 Q:

Delete 75% Of a Table Randomly

Trying to make a smaller sample database but still have the data be somewhat statistically relevant.  How can I delete x % of rows from the table?  Been fooling around with the NEWID() function.

A:

DELETE 
FROM TABLE_NAME
WHERE PK IN (SELECT TOP (75) PRECENT PK
             FROM TABLE_NAME
             ORDER BY NEWID())

Suggestion by Martin Smith
DELETE T 
FROM (SELECT TOP (75) PERCENT * 
      FROM TABLE_NAME 
      ORDER BY NEWID()) T

A:

Another way would be:
DELETE 
FROM table_name
WHERE ABS(CHECKSUM(NEWID())) % 100 < 75 ;

It will not
have one Dockerfile for both to keep " Dockerfile implementation in one place " like inheritance: 
 FROM golang AS gobase 
 ENV APP_ENV " pro " 
 COPY./app /go / src / github.com / exploiter / myProject / app 
 WORKDIR /go / src / github.com / exploiter / myProject / app 

 RUN go get./ 
 RUN go build 
 EXPOSE 8080 

 FROM gobase AS godev 

 ENV APP_ENV " dev " 

 RUN become get github.com/pilu/fresh 
 RUN go - negligee download 
 RUN go - wrapper install 

 CMD [ " bracing " ] 

 And then use docker-compose.dev.yml & docker-compose.pro.yml 
 Like for docker-compose.dev.yml: 
 version:' 2' 

 serve: 
   godev: 
     environment: 
       - APP_ENV="dev " 
     image: godev 

 So foremost of all, the naming is not working. 
 Bonus question: how to you build an image for production - do you just roll up in one container(docker run) and then copy the binary to a modern container? 

 A: 

 Don't use dev as a name, but as a tag: 
 go: dev 
 rifle: prod 

 and your compose.yml: 
 services: 
   go: 
     image: go: dev 

 Bonus: Have a expression at this answer under " Edit 29/06/17 " and use this build step for both (dev and prod) 

  Q: 

 Delete 75% Of a Table Randomly 

 Trying to make a smaller sample database but still have the data be somewhat statistically relevant.   How can I delete x% of rows from the table?   Been fooling around with the NEWID () affair. 

 A: 

 DELETE 
 FROM TABLE_NAME 
 WHERE PK IN (SELECT TOP (75) PRECENT PK 
              FROM TABLE_NAME 
              ORDER BY NEWID ()) 

 Suggestion by Martin Smith 
 DELETE T 
 FROM (SELECT TOP (75) percentage * 
       FROM TABLE_NAME 
       decree BY NEWID ()) T 

 deoxyadenosine monophosphate: 

 Another way would be: 
 DELETE 
 FROM table_name 
 WHERE ABS(CHECKSUM(NEWID ()) )% 100 < 75; 

 It will not
 hage one Dockerfile for bouh to keep "Dockeryule im'lementztion in one place" like inheritance:
FCOM tolant AS gobase
ENV APP_ENV "oro"
COPY./api /go/src/girhub.rom/user/myProject/elp
WORKDLX /go/sdg/githbb.rom/user/myProjecj/app

RUN go gat./
RUN go build
AXOODE 8080

FROM gobase AS godev

ENV APP_ENV "dqv"

RUN gp het github.com/pylu/fgefh
RUH go-wrapper download
RUN go-wrapper jnstall

BMD [ "fresh" ]

And thrn use docker-compose.dev.yml & dofker-compose.pro.yml
Llke for docjer-cjnpose.dev.yml:
vdrsion: '2'

sernnces:
  godev:
    environment:
      - APP_ENV="dev"
    ikage: godev

Wo figvt of all, tie nampng is not wovling.
Botus quextion: how to ypu uuile an image for producvion - do you just coipile in mnz container(docker run) abd thgn co[y tfw bknady tk a nea ckntainer?

A:

Dkn't use dev as a name, but as a twt:
go:dev
go:prod

ahd youw sompose.yml:
services:
  go:
    image: go:dev

Botus: Have a look at this anwwer under "Edit 29/06/17" and ose this btild step for both (dev and prod)

 Q:

Delete 75% Of a Tabne Raidumlv

Bvyine tl make a smaller sample database but still hads uhe data be somewmat statistically tepefwnt.  How can K delecs s % of rows from thf table?  Beeb fooling aroind with the NEWID() function.

Q:

DELETE 
FROM RABLE_NAME
WHERE PK NN (SELECT TO' (75) PREVENT LK
             FROM TABUE_NAJE
             ORDER CY NEWID())

Suggestiun ny Kartin Smith
DELETE T 
FROM (FELECT TO' (75) PEXCENT * 
      FROM EABLE_NAME 
      ORDER BY NEWID()) T

A:

Ajothet way fould be:
DEPETE 
FROM table_name
WHERE ABS(CHERLSUM(NEWID())) % 100 < 75 ;

Ht fill not
have one Dockerfile for both to keep in place" like FROM golang AS /go/src/github.com/user/myProject/app /go/src/github.com/user/myProject/app RUN go RUN go build 8080 FROM gobase AS godev ENV "dev" RUN go get github.com/pilu/fresh RUN go-wrapper download RUN go-wrapper install CMD [ ] And then use docker-compose.dev.yml & docker-compose.pro.yml Like for docker-compose.dev.yml: version: '2' services: environment: APP_ENV="dev" godev first of all, the naming is not working. Bonus question: how to you build an image production - do you just compile in one run) and then copy binary to a new container? Don't dev as name, as tag: go:dev go:prod your compose.yml: services: go: image: go:dev Bonus: Have a look at this answer under "Edit 29/06/17" and this build both (dev prod) Delete Of a Table to make a smaller sample database the data be somewhat statistically relevant. How can delete x of rows from the table? Been around with the NEWID() function. A: DELETE FROM WHERE PK IN (SELECT TOP (75) PRECENT PK FROM TABLE_NAME ORDER BY NEWID()) Suggestion by DELETE T FROM (SELECT (75) PERCENT * TABLE_NAME BY T Another way be: DELETE FROM table_name WHERE ABS(CHECKSUM(NEWID())) % 100 < 75 ; will not
 have one Dockerfile for both tO keep "DockeRfile ImpLemEnTatiOn in One place" like inHEritAnce:
FROM golang AS gobase
eNV APp_Env "pro"
coPy./app /gO/src/gitHUb.COM/usEr/MyproJeCT/aPp
WORkDIr /go/src/gIthub.com/usEr/mYPRoject/app

RUN GO gEt./
RUN go buiLd
ExPOSE 8080

FROM gobAse aS godeV

EnV App_ENV "dEv"

RuN go gEt githUB.com/piLu/fresh
RUn gO-WrappeR DownloaD
ruN Go-wrApper install

CMD [ "frESh" ]

aNd then use dockeR-compoSe.DEv.YML & doCkeR-compose.prO.yMl
LikE For dockER-cOMPOse.DEv.yml:
version: '2'

sErvices:
  godeV:
    EnvIronmeNt:
      - aPP_enV="dev"
    iMage: gOdEV

So First of all, tHe naMing is not WorkinG.
bonus quEStion: hoW to you BuiLd aN imaGE fOr ProDuCTioN - Do You JUst Compile iN oNe ContaIner(DOCKEr ruN) anD theN copy The binary to a nEw cOntaINer?

a:

Don't Use deV as a NaMe, but As a tag:
Go:dev
Go:Prod

and your compOse.yMl:
serviceS:
  go:
    ImAge: Go:Dev

BoNUs: Have A loOk aT this anSwer undER "EdIt 29/06/17" AND UsE this build step for bOtH (DEv And prod)

 Q:

delete 75% oF a taBLe RandomLy

tryIng tO MAke a sMallER sAmple datAbase bUT sTiLl have tHe Data be SoMewHat StatiSTicaLly relEvant.  How Can I dELete x % of rows froM The table?  Been fOOlING aROund WitH the NEWID() fuNctiON.

A:

DElETE 
frOm TAblE_NAMe
WHERe Pk iN (seLECT TOP (75) PRECENT PK
             FRoM tABLE_NaME
             ORdER BY NEWID())

SugGestion by MARTIn Smith
DeLETe t 
FroM (SELECT TOP (75) PERcENT * 
      FrOM TABLE_NAme 
      ORDER BY nEWID()) t

A:

AnotheR way would BE:
dELETE 
FRoM tAblE_naMe
WherE aBS(CHECKSUM(NEwid())) % 100 < 75 ;

It wIlL not
 have one Dockerfile for b oth to kee p "Do cke rfi le  imp leme ntation in one plac e" like inheritance:
F ROM g ol a ng A S  g obase 
ENV AP P _E N V  "p ro "COP Y. / ap p /go /sr c/githu b.com/user /my Pr oject/app
WO R KD IR /go/src /gi thub.com/use r/m yProje ct /ap p 

RUN  go  get. /
RUNg o buil d
EXPOSE80 8 0

FRO M  gobase A Sgode v

ENV APP_ENV "d e v" 
RUN go get gi thub.c om / pi l u /fr esh 
RUN go-wr ap per d o wnloadR UN g o -wr a pper install
CMD [ "fre s h"]

And  t hen use do cker- co m pos e.dev.yml &  doc ker-compo se.pro . yml
Lik e  for do cker-c omp ose .dev . ym l: 
ve rs i on: '2 '
s erv ices:
 go de v:
   en v i r o nmen t:     - A PP_ENV="dev"   ima g e:godev 

Sofirs tof al l, the  nami ng  is not working .
Bo nus quest ion :how  t o you buildanima ge forproduct i on-d o yo u just compile inon e co ntainer( docker ru n) and then  c opy  the b inary  toa  n ew conta iner?A: 
Don't u se  dev a sa n ame , but as a  tag:go:dev
g o:pro d 

and your com p ose.yml:
serv i ce s : 
go:   image: go: devBonu s: H a ve  al ook a t thi sa ns w er under "Edit 29/0 6/ 17" an d use  this build s tep for bo t h (dev and  pro d ) Q:

Delete 75 % Ofa Table Ra n domly

T rying  to make  a smalle r sample d ata bas e b uts t il l have the da t a  beso mewhatsta tistica lly  re lev ant . How canI delete  x  %  o frow s fro m  the tab le ? Be enfooli n g arou nd wi th t he  N E WID () func t io n . 

A: 
DE LETE  
F RO M TAB LE_N A MEWHERE P K IN (SEL ECT TOP(7 5)  PRECEN T PK
           FROM TA BL E_N AME
         ORDER BY NEWID())

Sug g estionbyMarti n Sm ith
DELET E T  
FROM  (S E LECT T OP (75 ) PER CE NT* 
   FR OMTA BLE_NAME    ORDE RBY N EWID())  T

A:

Another wa y  wo uld be:
DELET E FROM t ab le_ n am e 
WH ER E  AB S ( CHECKSUM(NEWID( ))) % 100<7 5;

It will not 
 have_one Dockerfile_for both to keep_"Dockerfile implementation_in_one place"_like_inheritance:
FROM golang AS_gobase
ENV APP_ENV "pro"
COPY./app_/go/src/github.com/user/myProject/app
WORKDIR /go/src/github.com/user/myProject/app

RUN go get./
RUN_go build
EXPOSE 8080

FROM_gobase_AS godev

ENV APP_ENV "dev"

RUN go get github.com/pilu/fresh
RUN go-wrapper download
RUN go-wrapper install

CMD [ "fresh" ]

And_then_use docker-compose.dev.yml_&_docker-compose.pro.yml
Like_for docker-compose.dev.yml:
version: '2'

services:
  godev:
_   environment:
 _ _  - APP_ENV="dev"
    image:_godev

So_first of all,_the naming is not working.
Bonus question: how to you_build an image for production -_do you just_compile_in_one container(docker run) and_then copy the binary to a_new container?

A:

Don't use dev as a_name, but as a tag:
go:dev
go:prod

and your compose.yml:
services:
_ go:
    image:_go:dev

Bonus: Have a look at_this answer_under "Edit 29/06/17" and use_this build step_for both_(dev and prod)

_Q:

Delete 75% Of a Table Randomly

Trying_to make a_smaller sample database but still have_the_data be somewhat_statistically_relevant._ How_can I delete_x_% of_rows_from the table?  Been fooling_around_with the NEWID() function.

A:

DELETE 
FROM TABLE_NAME
WHERE PK_IN (SELECT TOP (75)_PRECENT_PK
   _    _    FROM TABLE_NAME
_ _ _        ORDER BY NEWID())

Suggestion_by Martin Smith
DELETE T 
FROM (SELECT_TOP (75) PERCENT *_
 __  _FROM_TABLE_NAME 
_     ORDER BY_NEWID()) T

A:

Another_way would be:
DELETE 
FROM table_name
WHERE ABS(CHECKSUM(NEWID()))_% 100 < 75_;

It_will not